Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8316197: Make tracing of inline cache available in unified logging #17026

Closed
wants to merge 7 commits into from

Conversation

yftsai
Copy link
Contributor

@yftsai yftsai commented Dec 7, 2023

This removes develop flag TraceICs and makes the logs available via -Xlog.

Example:

% java -Xlog:inlinecache=trace -version
[0.061s][trace][inlinecache] CompiledDirectStaticCall@0x00007f3739001d17: set_to_interpreted java.lang.StringLatin1.hashCode([B)I
[0.078s][trace][inlinecache] IC@0x00007f3739004a87: monomorphic to compiled (rcvr klass = nullptr)
[0.079s][trace][inlinecache] CompiledDirectStaticCall@0x00007f3739005dff: set_to_interpreted jdk.internal.util.ArraysSupport.vectorizedHashCode(Ljava/lang/Object;IIII)I
[0.079s][trace][inlinecache] CompiledDirectStaticCall@0x00007f373900502f: set_to_interpreted jdk.internal.org.objectweb.asm.ByteVector.enlarge(I)V
[0.079s][trace][inlinecache] IC@0x00007f373900502f: monomorphic to interpreter: {method} {0x00007f36f03e6318} 'enlarge' '(I)V' in 'jdk/internal/org/objectweb/asm/ByteVector'
[0.079s][trace][inlinecache] CompiledDirectStaticCall@0x00007f3739006b0f: set_to_compiled 0x00007f3739002120
[0.083s][trace][inlinecache] CompiledDirectStaticCall@0x00007f373900928f: set_to_interpreted java.lang.AbstractStringBuilder.newCapacity(I)I
[0.083s][trace][inlinecache] IC@0x00007f373900928f: monomorphic to interpreter: {method} {0x00007f36f00cd170} 'newCapacity' '(I)I' in 'java/lang/AbstractStringBuilder'
...

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8316197: Make tracing of inline cache available in unified logging (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17026/head:pull/17026
$ git checkout pull/17026

Update a local copy of the PR:
$ git checkout pull/17026
$ git pull https://git.openjdk.org/jdk.git pull/17026/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17026

View PR using the GUI difftool:
$ git pr show -t 17026

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17026.diff

Webrev

Link to Webrev Comment

Yi-Fan Tsai added 4 commits December 5, 2023 21:38
The following test has passed.
```
make CONF=linux-x86_64-server-fastdebug test TEST="test/hotspot/jtreg/compiler/arguments/TestTraceICs.java"
```
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 7, 2023

👋 Welcome back yftsai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 7, 2023
@openjdk
Copy link

openjdk bot commented Dec 7, 2023

@yftsai The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Dec 7, 2023
@mlbridge
Copy link

mlbridge bot commented Dec 7, 2023

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed compiler/arguments/TestTraceICs.java test.

@@ -25,8 +25,7 @@
* @test
* @bug 8217447
* @summary Test running TraceICs enabled.
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+TraceICs
* compiler.arguments.TestTraceICs
* @run main/othervm compiler.arguments.TestTraceICs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to add -Xlog:inlinecache=trace flag to keep previous test's behavior and check your new code.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. I will submit our testing.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My testing tier and tier2(which runs the test) passed.
You need second review.

@openjdk
Copy link

openjdk bot commented Dec 8, 2023

@yftsai This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8316197: Make tracing of inline cache available in unified logging

Reviewed-by: kvn, dholmes

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 79 new commits pushed to the master branch:

  • 6359b4e: 8318217: RISC-V: C2 VectorizedHashCode
  • ce4b257: 8320886: Unsafe_SetMemory0 is not guarded
  • b270f30: 8318629: G1: Refine code a bit in G1RemSetTrackingPolicy::update_at_allocate
  • 486594d: 8316657: Support whitebox testing in microbenchmarks
  • ce8399f: 8321582: yield .class not parsed correctly.
  • 3c6459e: 8321641: ClassFile ModuleAttribute.ModuleAttributeBuilder::moduleVersion spec contains a copy-paste error
  • 92fd490: 8321176: [Screencast] make a second attempt on screencast failure
  • d13302f: 8321387: SegmentAllocator:allocateFrom(AddressLayout, MemorySegment) does not throw stated UnsupportedOperationException
  • ce10844: 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays)
  • 5c12a18: 8320790: Update --release 22 symbol information for JDK 22 build 27
  • ... and 69 more: https://git.openjdk.org/jdk/compare/9e570105c30a6e462d08931e2010cef9cd5a6031...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@vnkozlov, @dholmes-ora) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 8, 2023
Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look fine to me.

I think the test can go but that is up to @vnkozlov .

Thanks

@@ -25,7 +25,7 @@
* @test
* @bug 8217447
* @summary Test running TraceICs enabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The summary is no longer applicable.

But really this test seems some what pointless. It basically checks that Xlog:inlinecache is a valid log setting, but doesn't actually check anything interesting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. TestLogJIT is similar in only enabling the log setting without checking anything.

Copy link
Contributor

@vnkozlov vnkozlov Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these tests could check output but it is separate issue. Let keep them and update later.

@yftsai
Copy link
Contributor Author

yftsai commented Dec 11, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Dec 11, 2023
@openjdk
Copy link

openjdk bot commented Dec 11, 2023

@yftsai
Your change (at version 23e4e73) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 18, 2023

Going to push as commit c0a3b76.
Since your change was applied there have been 142 commits pushed to the master branch:

  • 7e1d26d: 8322287: Parallel: Remove unused arg in adjust_eden_for_pause_time and adjust_eden_for_minor_pause_time
  • 5584ba3: 8322097: Serial: Refactor CardTableRS::find_first_clean_card
  • 75d382d: 8322204: Parallel: Remove unused _collection_cost_margin_fraction
  • febf8af: 8322089: Parallel: Remove PSAdaptiveSizePolicy::set_survivor_size
  • 10335f6: 7001133: OutOfMemoryError by CustomMediaSizeName implementation
  • ecff9c1: 8315040: Remove redundant check in WorkerPolicy::parallel_worker_threads
  • a247d0c: 8322209: RISC-V: Enable some tests related to MD5 instrinsic
  • 341b4e0: 8321975: Print when add_reserved_region fails even in product mode
  • f696796: 8280087: G1: Handle out-of-mark stack situations during reference processing more gracefully
  • 413dbf8: 8322205: Parallel: Remove unused arg in PSCardTable::pre_scavenge
  • ... and 132 more: https://git.openjdk.org/jdk/compare/9e570105c30a6e462d08931e2010cef9cd5a6031...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 18, 2023
@openjdk openjdk bot closed this Dec 18, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Dec 18, 2023
@openjdk
Copy link

openjdk bot commented Dec 18, 2023

@phohensee @yftsai Pushed as commit c0a3b76.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@yftsai yftsai deleted the JDK-8316197 branch December 19, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
4 participants