-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8258414: OldObjectSample events too expensive #2780
Conversation
👋 Welcome back mgronlun! A progress list of the required criteria for merging this PR into |
@mgronlun Could not parse
|
Webrevs
|
@@ -196,9 +220,9 @@ traceid JfrStackTraceRepository::add_trace(const JfrStackTrace& stacktrace) { | |||
} | |||
|
|||
// invariant is that the entry to be resolved actually exists in the table | |||
const JfrStackTrace* JfrStackTraceRepository::lookup(unsigned int hash, traceid id) const { | |||
const JfrStackTrace* JfrStackTraceRepository::lookup(unsigned int hash, traceid id) { |
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.
Could the comment be extended to make it explicit that the lookup will be done only in the leak profiler stacktrace repo? Or, better yet the method renamed to lookup_in_leak_profiler()
(but it might be too long ...).
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, Jaroslav - yes, indeed.
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 also attempted to have the artefact tagging happen lazily, e.g. methods and classes, making it a part of the stack trace resolution process. There is a problem with that approach concerning class unloading because a referenced class can unload, but since it does not yet have the proper tag, the framework does not intercept it. I elaborated on setting an "interest" tag to handle this, but that approach opens additional challenges related to visibility and concurrency. Hard problem to solve; I was unable to do it (yet).
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.
Probably can live without lazy tagging in the first iteration - still it will be much better than the current state.
And then we can keep on adding incremental improvements based on cost-benefit weighing.
@mgronlun 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 163 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 |
/contributor add Florian David florian.david@datadoghq.com |
@mgronlun |
/integrate |
@mgronlun Since your change was applied there have been 163 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit a9b156d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Yahoo! Thanks, Markus! |
Thank you, Jaroslav for contributing and reviewing! |
/backport jdk16u |
@jbachorik Unknown command |
/help |
@jbachorik Available commands:
|
Hi Florian,
thanks for your great attempt to fix this issue, it is indeed a complex area with many interrelations.
I think your suggestion has two problems that we need to solve:
If we separate the Leak Profiler stacktraces from the "regular" traces, there is a disconnect at the stacktrace record site, because the stacktrace id is cached to the thread. This means other events (ObjectAllocationSample and other memory allocation events) will attempt to reuse the id. Since this id is no longer valid for reuse, it must be handled.
The division into two separate stacktrace repositories now also separates the stacktrace id assignment, with a consequence that separate stacktraces can now end up having overlapping and conflicting ids.
I also appreciated your effort in trying to incorporate the count of the traces written, to be tallied in the "regular" process. I do think we can simplify this a bit by not having them tallied (they are only a very small number, max 256 by default).
Please take a look and let me know what you think about this suggestion.
Thanks!
Markus
PS If we go with this suggestion, I will put you down as a contributor.
Progress
Issue
Reviewers
Contributors
<florian.david@datadoghq.com>
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2780/head:pull/2780
$ git checkout pull/2780