RFR: 8342818: Implement CPU Time Profiling for JFR [v10]
Johannes Bechberger
jbechberger at openjdk.org
Wed Nov 6 10:57:59 UTC 2024
On Wed, 6 Nov 2024 10:11:18 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:
>> 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.
>
> I just looked into it. We only call the methods that take the locks when
> - the sampler is first enrolled
> - the timer intervals are updated
> - the timer is stopped
>
> This shouldn't happen that often in practice, so I think that it is good to have the additional guarantees offered by safepoints.
>
> We can modify this if we see real world performance issues.
So maybe we do timer init and removal at global safepoints?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1830813096
More information about the hotspot-dev
mailing list