@@ -1715,6 +1715,7 @@ VM_GetFrameLocation::doit() {
1715
1715
1716
1716
void
1717
1717
VThreadGetOwnedMonitorInfoClosure::do_thread (Thread *target) {
1718
+ assert (target->is_Java_thread (), " just checking" );
1718
1719
Thread* cur_thread = Thread::current ();
1719
1720
ResourceMark rm (cur_thread);
1720
1721
HandleMark hm (cur_thread);
@@ -1731,7 +1732,6 @@ VThreadGetOwnedMonitorInfoClosure::do_thread(Thread *target) {
1731
1732
oop carrier_thread = java_lang_VirtualThread::carrier_thread (_vthread_h ());
1732
1733
JavaThread* java_thread = java_lang_Thread::thread (carrier_thread);
1733
1734
1734
- _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
1735
1735
ThreadsListHandle tlh;
1736
1736
if (java_thread != NULL && tlh.includes (java_thread)
1737
1737
&& !java_thread->is_exiting () && java_thread->threadObj () != NULL ) {
@@ -1744,6 +1744,7 @@ VThreadGetOwnedMonitorInfoClosure::do_thread(Thread *target) {
1744
1744
1745
1745
void
1746
1746
VThreadGetCurrentContendedMonitorClosure::do_thread (Thread *target) {
1747
+ assert (target->is_Java_thread (), " just checking" );
1747
1748
oop carrier_thread = java_lang_VirtualThread::carrier_thread (_vthread_h ());
1748
1749
if (carrier_thread == NULL ) {
1749
1750
// virtual thread is unmounted, so it can not be contended on a monitor
@@ -1768,6 +1769,7 @@ VThreadGetThreadClosure::do_thread(Thread *target) {
1768
1769
1769
1770
void
1770
1771
VThreadGetStackTraceClosure::do_thread (Thread *target) {
1772
+ assert (target->is_Java_thread (), " just checking" );
1771
1773
Thread* cur_thread = Thread::current ();
1772
1774
ResourceMark rm (cur_thread);
1773
1775
HandleMark hm (cur_thread);
@@ -1779,17 +1781,20 @@ VThreadGetStackTraceClosure::do_thread(Thread *target) {
1779
1781
1780
1782
void
1781
1783
VThreadGetFrameCountClosure::do_thread (Thread *target) {
1784
+ assert (target->is_Java_thread (), " just checking" );
1782
1785
_result = ((JvmtiEnvBase*)_env)->get_frame_count (_vthread_h (), _count_ptr);
1783
1786
}
1784
1787
1785
1788
void
1786
1789
VThreadGetFrameLocationClosure::do_thread (Thread *target) {
1790
+ assert (target->is_Java_thread (), " just checking" );
1787
1791
_result = ((JvmtiEnvBase*)_env)->get_frame_location (_vthread_h (), _depth,
1788
1792
_method_ptr, _location_ptr);
1789
1793
}
1790
1794
1791
1795
void
1792
1796
VThreadGetThreadStateClosure::do_thread (Thread *target) {
1797
+ assert (target->is_Java_thread (), " just checking" );
1793
1798
jshort vthread_state = java_lang_VirtualThread::state (_vthread_h ());
1794
1799
oop carrier_thread_oop = java_lang_VirtualThread::carrier_thread (_vthread_h ());
1795
1800
jint state;
0 commit comments