RFR: 8342818: Implement CPU Time Profiling for JFR [v4]
Johannes Bechberger
jbechberger at openjdk.org
Thu Oct 31 06:46:38 UTC 2024
On Thu, 31 Oct 2024 02:56:27 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> @jbachorik if you take out the `Threads_lock` you will delay real safepoints. Direct use of the Threads_lock is not desirable as it can lead to unexpected deadlocks and interferes with safepoints.
>>
>> If all you want is to create timers for all existing threads then use of a ThreadsListIterator should suffice as a snapshot.
>
> 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.
How would I implement this?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20752#discussion_r1823828705
More information about the hotspot-dev
mailing list