RFR: 8342818: Implement CPU Time Profiling for JFR [v4]
David Holmes
dholmes at openjdk.org
Fri Nov 1 05:28:46 UTC 2024
On Thu, 31 Oct 2024 06:37:45 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> Of course you are racing with the execution of those other threads either way. In contrast if you do this at a safepoint you know the exact state of each thread and will know, for example, that the timer was created before the thread could terminate.
>
> Is this really an issue? And if so, how would I implement this?
Whether the racing is an issue only you can answer. My concern is that using the `Threads_lock` is bad and unnecessary - if you want a stable set of threads then you just need a `ThreadsListIterator`.
Otherwise you'd implement with a safepoint VM operation that you submit to the VMThread.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1825440196
More information about the hotspot-dev
mailing list