-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8339954: Print JVMCI names with the Compiler.{perfmap,codelist,CodeHeap_Analytics} diagnostic commands #20954
Conversation
…p_Analytics} diagnostic commands
👋 Welcome back simonis! A progress list of the required criteria for merging this PR into |
@simonis 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:
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 47 new commits pushed to the
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. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this. Lgtm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
/integrate |
Going to push as commit 996790c.
Your commit was automatically rebased without conflicts. |
The diagnostic commands
Compiler.codelist
,Compiler.CodeHeap_Analytics
andCompiler.perfmap
are handy for analyzing the CodeCache or creating a symbol file for the perf tool. However, with the Truffle framework which uses the GraalVM compiler in "hosted" mode, we can end up with hundreds if not thousands of nmethods which are all linked to the same Java method (most prominentlycom.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot()
). All these nmethods are currently indistinguishable by the two aforementioned diagnostic commands.But nmethods compiled by the GraalVM compiler have a special "JVMCI name" attached to them, which in the case of Truffle corresponds to the guest language function name. Printing this "JVMCI name" in addition to the true Java method name makes it easier to distinguish various nmethods compiled by Truffle or other frameworks which use the GraalVM compiler in hosted mode.
For the
Compiler.perfmap
command, it should be mentioned that the format of the created perfmap file is specified here:https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/jit-interface.txt
It only mandates that each line starts with a start and size number in hex and interprets the whole rest of the line (which can even include special characters) as a "symbolname". Taking into account that we already today produce "symbol names" as different as "
throw_range_check_failed Runtime1 stub
", "Signature Handler Temp Buffer
", "I2C/C2I adapters
" or "boolean java.lang.invoke.VarHandleInts$FieldInstanceReadWrite.compareAndSet(java.lang.invoke.VarHandle, java.lang.Object, int, int)
", adding a potential jvmci suffix like "jvmci_name=myFancyJSFunction()#2" to some methods will not cause any compatibility issues...and the output of
Compiler.CodeHeap_Analytics
is unparsable anyway :)Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20954/head:pull/20954
$ git checkout pull/20954
Update a local copy of the PR:
$ git checkout pull/20954
$ git pull https://git.openjdk.org/jdk.git pull/20954/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20954
View PR using the GUI difftool:
$ git pr show -t 20954
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20954.diff
Webrev
Link to Webrev Comment