8265148: StackWatermarkSet being updated during AsyncGetCallTrace#4217
8265148: StackWatermarkSet being updated during AsyncGetCallTrace#4217lmesnik wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into |
|
I verified that running sunflow with async-profiler crashed VM before the fix and finished successfully after the fix. I compared data for G1GC for older JDK before https://bugs.openjdk.java.net/browse/JDK-8253180 is implemented. The results look pretty similar. |
dholmes-ora
left a comment
There was a problem hiding this comment.
Hi Leonid,
Someone familiar with Stackwatermarks will need to comment about the validity of doing this, my only comment is to document why it is being turned off.
Thanks,
David
| int loop_count; | ||
| int loop_max = MaxJavaStackTraceDepth * 2; | ||
| RegisterMap map(thread, false); | ||
| RegisterMap map(thread, false, false); |
There was a problem hiding this comment.
Can we add some comments as to what the false parameters mean please.
RegisterMap map(thread, false /* no update */, false /*no stackwatermark frame processing */);
Though it may be that a more elaborate block comment is needed to explain why we don't want stackwatermark frame processing.
There was a problem hiding this comment.
Let me check with Erik if it makes sense to put more generic comments about the usage of stackwatermark frame processing in RegisterMap, frames etc. They can't be updated in an arbitrary thread state. It makes sense describe this info in stackwatermarking.
There was a problem hiding this comment.
Let me check with Erik if it makes sense to put more generic comments about the usage of stackwatermark frame processing in RegisterMap, frames etc. They can't be updated in an arbitrary thread state. It makes sense describe this info in stackwatermarking.
You could say something generic like "StackWatermark can only be used when at points where the stack can be parsed by the GC", or something like that.
There was a problem hiding this comment.
Thank you for your prompt response. I meant that it makes sense to update comments for RegisterMap to mention this. Currently, the doc says how to use it and how to disable update:
"Updating of the RegisterMap can be turned off by instantiating the
// register map as: RegisterMap map(thread, false);"
But it says nothing about why and how process_frames should be set.
It might make sense to put this info there so anyone could easily find and read it. I think it is better to put it there rather than in forte.cpp.
There was a problem hiding this comment.
Thank you for your prompt response. I meant that it makes sense to update comments for RegisterMap to mention this. Currently, the doc says how to use it and how to disable update:
"Updating of the RegisterMap can be turned off by instantiating the
// register map as: RegisterMap map(thread, false);"
But it says nothing about why and how process_frames should be set.
It might make sense to put this info there so anyone could easily find and read it. I think it is better to put it there rather than in forte.cpp.
Yes I agree - that does make sense.
stefank
left a comment
There was a problem hiding this comment.
Looks good. Could you verify the fix with ZGC? G1 doesn't use it, so testing with G1 will only show that we don't hit the failing assert anymore.
|
@lmesnik 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 24 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 |
fisk
left a comment
There was a problem hiding this comment.
Looks good, but please test with ZGC before integrating.
|
I verified that async-profiles works with ZGC and data look reasonable. |
|
/integrate |
|
@lmesnik Since your change was applied there have been 56 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 2b33835. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4217/head:pull/4217$ git checkout pull/4217Update a local copy of the PR:
$ git checkout pull/4217$ git pull https://git.openjdk.java.net/jdk pull/4217/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4217View PR using the GUI difftool:
$ git pr show -t 4217Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4217.diff