RFR: 8357650: ThreadSnapshot to take snapshot of thread for thread dumps [v2]

Alan Bateman alanb at openjdk.org
Wed May 28 13:37:55 UTC 2025


On Wed, 28 May 2025 06:59:48 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   move to ThreadService
>
> src/hotspot/share/classfile/javaClasses.cpp line 1875:
> 
>> 1873: 
>> 1874: oop java_lang_Thread::park_blocker(oop java_thread) {
>> 1875:   return java_thread->obj_field_acquire(_park_blocker_offset);
> 
> Where is the releasing store that pairs with this load-acquire?

Thread.parkBlocker is declared volatile but all access is done in opaque mode, so maybe this should MO_RELAXED?

In any case, I think we might have to drop the sampling of exclusiveOwnerThread for now. This can only be tested to see if it's the current thread, and only after a volatile-state of the state.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2111943610


More information about the hotspot-dev mailing list