RFR: 8369283: Improve trace logs in safepoint machinery [v7]

Robbin Ehn rehn at openjdk.org
Thu Oct 9 11:30:29 UTC 2025


On Thu, 9 Oct 2025 09:03:17 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> 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:
1: As you have located the interesting sections, it would be nice if we could make use of them as general trace points.
   Meaning it would be nice if e.g. JFR could share these locations.
2: We log threads a bit different, it would be nice if there was thread formatter, so all threads comes out identically.
  And for a real user TID (threads PID in linux) is the identifier which is useful, as you can e.g. attach perf to that tid/pid.
  The logging of pointers to Thread is only useful to seperate them.

Hence please log TID (linux thread pid), so one can do perf record --pid "TID" or nice or what you need.
Now if that should be done in a completely different PR, maybe addressing 2 or here I'm unsure of, so I'll approve as is and let you guys think about it or ignore :)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27673#issuecomment-3385419548


More information about the hotspot-dev mailing list