RFR: 8307865: Invalid is_in_any_VTMS_transition() check in post_dynamic_code_generated_while_holding_locks

Leonid Mesnik lmesnik at openjdk.org
Thu May 18 20:48:50 UTC 2023


On Thu, 18 May 2023 20:35:47 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Method post_dynamic_code_generated_while_holding_locks()
>> register stubs and might be called during VTMT transitions.
>> At least it is called in tmp VTMT transition, and stubs might be generated during standard VTMT transition.
>> 
>> The method doesn't post event but just register stub for later posting so it might be called during transition.
>> 
>> Also, the test has been updated to test virtual threads. It crashed before fix and start passing after fix.
>> Additionally, checked this test with Xcomp, run tier1/tier5 and some stress testing
>
> test/hotspot/jtreg/serviceability/jvmti/DynamicCodeGenerated/DynamicCodeGeneratedTest.java line 55:
> 
>> 53:         Runnable task = () -> {
>> 54:             String result = "string" + System.currentTimeMillis();
>> 55:             LockSupport.parkNanos(1);
> 
> Why is this needed?

It is needed to provoke thread re-mounting to trigger VTMT transitions.
The test wouldn't fail without it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13921#discussion_r1198287501


More information about the hotspot-dev mailing list