RFR: 8311556: GetThreadLocalStorage not working for vthreads mounted during JVMTI attach
Leonid Mesnik
lmesnik at openjdk.org
Wed Jul 12 06:23:12 UTC 2023
On Wed, 12 Jul 2023 05:02:53 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> This is an issue with a dynamic load of a JVMTI agent into running VM.
> The `VM_SetNotifyJvmtiEventsMode` enabling operation makes a call to the function `count_transitions_and_correct_jvmti_thread_states()`. This function in its turn make a call to the function `correct_jvmti_thread_state()`. But it does it conditionally, only if the field `_whitebox_used` is `true`.
> The test provided in the bug report showed that it has to be called unconditionally as the assumption that it is only needed on the subsequent `notifyJvmti` enabling is incorrect.
>
> Then the field `_whitebox_used` is not needed anymore and removed in this fix.
> Some obsolete comments are removed or updated.
>
> New test is added: `test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadTLSTest`.
> It is failed without the fix and passed with the fix.
>
> Testing:
> - ran new test `test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadTLSTest`
> - mach5 tiers 1-5 are good
Marked as reviewed by lmesnik (Reviewer).
test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadTLSTest/VThreadTLSTest.java line 29:
> 27: * @requires vm.continuations
> 28: * @requires vm.jvmti
> 29: * @compile VThreadTLSTest.java
I believe that this line is redundant. jtreg compiles test automatically.
test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadTLSTest/VThreadTLSTest.java line 39:
> 37: * @requires vm.continuations
> 38: * @requires vm.jvmti
> 39: * @compile VThreadTLSTest.java
I believe that this line is redundant like 29.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14842#pullrequestreview-1525583011
PR Review Comment: https://git.openjdk.org/jdk/pull/14842#discussion_r1260645294
PR Review Comment: https://git.openjdk.org/jdk/pull/14842#discussion_r1260645647
More information about the serviceability-dev
mailing list