On Tue, 16 May 2023 22:52:41 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:
>> This enhancement adds `PopFrame` support for virtual threads. The spec >> defines minimal support that the JVMTI `PopFrame` can be used for a virtual >> thread suspended an an event. >> Actually, the `PopFrame` can supports suspended and mounted virtual threads. >> >> CSR (approved): https://bugs.openjdk.org/browse/JDK-8308001: add PopFrame >> support for virtual threads >> >> Testing: >> New test was developed: `serviceability/vthread/PopFrameTest`. >> Submitted mach5 tiers 1-6 are good. >> TBD: rerun mach5 tiers 1-6 at the end of review again if necessary. > > test/hotspot/jtreg/serviceability/jvmti/vthread/PopFrameTest/libPopFrameTest.cpp > line 49: > >> 47: LOG("Breakpoint: In method TestTask.B(): before sync section enter\n"); >> 48: >> 49: err = jvmti->RawMonitorEnter(monitor); > > You could use RawMonitorLocker instead: > > { > RawMonitorLocker rml(jvmti, jni, monitor); > bp_sync_reached = true; > rml.wait(); > } Done. > test/hotspot/jtreg/serviceability/jvmti/vthread/PopFrameTest/libPopFrameTest.cpp > line 181: > >> 179: LOG("Main: notifyAtBreakpoint\n"); >> 180: >> 181: err = jvmti->RawMonitorEnter(monitor); > > You could use > > RawMonitorLocker rml(jvmti, jni, monitor); > rml.notify_all(); Good suggestion. I forgot we have this part of support in the test library. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14002#discussion_r1196111055 PR Review Comment: https://git.openjdk.org/jdk/pull/14002#discussion_r1196110720