On Thu, 18 May 2023 20:35:47 GMT, Chris Plummer <cjplum...@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

Reply via email to