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

Alex Menkov amenkov at openjdk.org
Thu May 29 03:41:53 UTC 2025


On Wed, 28 May 2025 19:36:39 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> src/hotspot/share/prims/jvm.cpp line 2968:
>> 
>>> 2966:   oop snapshot = VMThreadSnapshot::get_thread_snapshot(jthread, THREAD);
>>> 2967:   return JNIHandles::make_local(THREAD, snapshot);
>>> 2968: #elif
>> 
>> Q: should it be `#else` instead of `#elif`?
>
> right. this breaks minimal build

Fixed

>> src/hotspot/share/services/threadService.cpp line 1317:
>> 
>>> 1315:         const ContinuationEntry* ce = _thread->vthread_continuation();
>>> 1316:         if (ce == nullptr || ce->cont_oop(_thread) != java_lang_VirtualThread::continuation(_java_thread())) {
>>> 1317:           // TODO: handle
>> 
>> Q: What `TODO` is expected here?
>
> actually it's unreachable. can be dropped

dropped the code

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

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


More information about the hotspot-dev mailing list