RFR: 8357650: ThreadSnapshot to take snapshot of thread for thread dumps [v2]
Alex Menkov
amenkov at openjdk.org
Wed May 28 19:40:54 UTC 2025
On Wed, 28 May 2025 10:33:36 GMT, Serguei Spitsyn <sspitsyn 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/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
> src/hotspot/share/services/threadService.cpp line 39:
>
>> 37: #include "oops/objArrayKlass.hpp"
>> 38: #include "oops/objArrayOop.inline.hpp"
>> 39: #include "oops/oop.inline.hpp"
>
> I guess, the following include is also needed:
>
> #include "oops/method.hpp"
actually "oops/method.inline.hpp". Thanks
> 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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2112618339
PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2112539322
PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2112605468
More information about the hotspot-dev
mailing list