@@ -132,11 +132,11 @@ inline T* cast_to(const void* ptr) {
132132 f (VMContinuationEntry, MATCH_SYMBOLS(" ContinuationEntry" ))
133133
134134// Fields for JDK 21+ virtual-thread / continuation support.
135- // These are NOT reliably exported in gHotSpotVMStructs before JDK 27
136- // (added via JDK-8378985) and may be absent even on JDK 21-26 in some
137- // distributions. They are declared and populated the same way as regular
138- // fields but are intentionally excluded from verify_offsets() assertions
139- // so that a missing entry causes graceful degradation rather than SIGABRT.
135+ // ContinuationEntry was not exported in gHotSpotVMStructs until JDK 27
136+ // (JDK-8378985), so these fields are absent from the table in all JDK 21-26
137+ // builds and are populated via C++ mangled-symbol fallback instead. They are
138+ // intentionally excluded from verify_offsets() so that a missing entry causes
139+ // graceful degradation rather than SIGABRT.
140140#define DECLARE_V21_TYPE_FIELD_DO (type_begin, field, field_with_version, type_end ) \
141141 type_begin (VMJavaThread, MATCH_SYMBOLS(" JavaThread" , " Thread" )) \
142142 field_with_version (_cont_entry_offset, offset, 21 , MAX_VERSION, MATCH_SYMBOLS(" _cont_entry" )) \
@@ -870,6 +870,10 @@ DECLARE(VMThread)
870870 return VMJavaFrameAnchor::cast (at (_thread_anchor_offset));
871871 }
872872
873+ // Returns the innermost active ContinuationEntry for this thread, or nullptr
874+ // if none exists or ContinuationEntry layout is unavailable (JDK 21-26 without
875+ // vmStructs export). Used by stackWalker to locate the enterSpecial frame
876+ // when crossing the virtual-thread continuation boundary.
873877 VMContinuationEntry* contEntry () {
874878 if (_cont_entry_offset < 0 || VMContinuationEntry::type_size () == 0 ) return nullptr ;
875879 void * ptr = SafeAccess::loadPtr ((void **) at (_cont_entry_offset), nullptr );
0 commit comments