-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8369283: Improve trace logs in safepoint machinery #27673
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 shade! A progress list of the required criteria for merging this PR into |
|
Example log, plus some comments: |
|
@shipilev 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 7 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
|
|
Oops, cannot touch |
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.
Generally seems okay but a few queries.
Co-authored-by: David Holmes <62092539+dholmes-ora@users.noreply.github.com>
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.
Still one query on the removed part, but okay, seems reasonable.
I seemed to recall that once-upon-a-time we had TraceTimers(?) to gather the interesting elapsed time and other stats for safepoints.
|
Hey @robehn -- you improved/used this kind of logging the last time. How does it this PR look to you? |
Yea, I get what you are doing, it looks good. But two comments, a bit OT: Hence please log TID (linux thread pid), so one can do perf record --pid "TID" or nice or what you need. |
Right! In the initial version of the patch, I printed thread names as external identifiers. Then I realized you cannot touch the names, because they can allocate, so I removed that part. But that also loses any external ident for threads. I now pushed the commit that prints the thread TIDs. Updated log snippet here: #27673 (comment) |
fbredber
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.
Looks good to me.
|
Thanks for reviews, all! The crude parsing tool I now have tells me the logging is fairly complete for the safepoint investigation purposes. The re-run of /integrate |
|
Going to push as commit 1992b69.
Your commit was automatically rebased without conflicts. |
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.
Good update on the thread_id(). I had considered that earlier but it seemed we were using the address elsewhere so I didn't raise it. :)


During the performance investigations in safepoint machinery (notably JDK-8350324), I found the trace logging lacking. It would be good to improve it in order to finely profile various microscopic things like thread list walks, the blocking/resuming of Java threads, etc. For JDK-8350324, for example, I want to be able to measure the Java thread delays if they assist in avalanche wakeups.
This leans heavily on unified logging and invariant clocks to do the right thing, but I think it is a fair compromise for simplicity. The configuration I found most useful for testing is:
My tentative plan is to visualize this more comprehensively with a little tool that digests that log.
I am open for bikeshedding on logging wording. The log example is in the comment below.
Additional testing:
tier1allProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27673/head:pull/27673$ git checkout pull/27673Update a local copy of the PR:
$ git checkout pull/27673$ git pull https://git.openjdk.org/jdk.git pull/27673/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27673View PR using the GUI difftool:
$ git pr show -t 27673Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27673.diff
Using Webrev
Link to Webrev Comment