RFR: 8332857: Test vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java failed

Serguei Spitsyn sspitsyn at openjdk.org
Fri Jan 17 02:01:50 UTC 2025


On Thu, 16 Jan 2025 22:39:48 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> The test lacks a synchronization, so it is added by this fix.
>> 
>> Testing:
>>  - Ran the failing test `vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002`
>>  - TBD: submit mach5 tiers 1-5
>
> test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/thrcputime002.cpp line 36:
> 
>> 34: 
>> 35: static jlong timeout = 0;
>> 36: static jrawMonitorID monitor;
> 
> Can you clarify which data this monitor is protecting? I think it is just prevTestedThreadTime and prevAgentThreadTime, in which case I think you should refine its usage. For example, is it really needed in any of the callbacks other than callbackThreadStart()?

My intention is to serialize event callback calls plus protect multi-threaded access/modification of these variables.
I can add a comment with this clarification.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23144#discussion_r1919452824


More information about the serviceability-dev mailing list