-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8289780: Avoid formatting stub names when Forte is not enabled #9386
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
Conversation
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
Webrevs
|
dholmes-ora
left a comment
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.
Cleanup looks good! Thanks.
|
@iklam 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 72 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 |
coleenp
left a comment
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.
This looks good. Leaving the name forte.cpp seems odd, even though some still refer to it that way. My vote would have been for asyncGetCallTrace.cpp
|
It turns out that So slight change of plan. I am adding a check to avoid computing the |
|
|
||
| class Forte : AllStatic { | ||
| public: | ||
| static bool is_enabled() NOT_JVMTI_RETURN_(false); |
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.
I don't think the rest of this forte code is disabled by JVMTI.
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.
If the answer to whether it's enabled is something you want to be fast, and doesn't change, maybe make it check a variable?
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.
The code in the Forte class, as well as the non-trivial of AsyncGetCallTrace() in forte.cpp, are inside #if INCLUDE_JVMTI. That's why I use NOT_JVMTI_RETURN_ for the new function.
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.
Ok, thanks for answering my question.
sspitsyn
left a comment
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.
I've posed one comment.
Other than that the fix looks okay.
Thanks,
Serguei
|
|
||
| if (JvmtiExport::should_post_dynamic_code_generated()) { | ||
| JvmtiExport::post_dynamic_code_generated(blob_id, new_adapter->content_begin(), new_adapter->content_end()); | ||
| } |
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.
The lines 2698-2670 is better to move out of the if-statement at the line 2687.
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.
HI Serguei, thanks for the review. Lines 2698-2700 need the blob_id which is generated at line 2688, so they have to stay inside the outer "if" block.
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, Ioi. You are right.
|
Thanks @dholmes-ora, @sspitsyn, @coleenp for the review. |
|
Going to push as commit 3c08e6b.
Your commit was automatically rebased without conflicts. |
Forte::register_stub()should be called only when the JVm is being instrumented by Forte (aka "Oracle Developer Studio")https://www.oracle.com/tools/developerstudio/downloads/developer-studio-jsp.html
We currently always format the name of generated stubs and call
Forte::register_stub(), which usually does nothing.Example:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/sharedRuntime.cpp#L2686-L2697
To improve start-up, we should check if Forte is enabled before formatting the name.
I also renamed some
#ifndef IA64around the code that I touched.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9386/head:pull/9386$ git checkout pull/9386Update a local copy of the PR:
$ git checkout pull/9386$ git pull https://git.openjdk.org/jdk pull/9386/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9386View PR using the GUI difftool:
$ git pr show -t 9386Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9386.diff