RFR: 8341273: JVMTI is not properly hiding some continuation related methods [v3]

Alan Bateman alanb at openjdk.org
Wed Oct 16 14:41:11 UTC 2024


On Wed, 16 Oct 2024 10:10:16 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/VirtualThread.java line 423:
>> 
>>> 421:                 }
>>> 422: 
>>> 423:             } finally {
>> 
>> This means an empty finally block, I assume you'll remove the try-finally here.
>
> Thank you for the comment. I can move the try-finally to the method `java/lang/VirtualThread$VThreadContinuation$1.run()` if you prefer. But it will play the same role functionally.

Changing the run method to

vthread.notifyJvmtiStart();
try {
    vthread.run(task);
} finally {
    vthread.notifyJvmtiEnd();
}

is okay. I was initially puzzled because the run method is already`@Hidden` but I don't think this is used by JVMTI.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21397#discussion_r1803248925


More information about the serviceability-dev mailing list