RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v5]

Serguei Spitsyn sspitsyn at openjdk.org
Fri Mar 24 00:26:33 UTC 2023


On Thu, 23 Mar 2023 18:02:29 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   address review comment: remove unneeded function
>
> test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java line 68:
> 
>> 66:             if (n <= 0) {
>> 67:                 n = 1000;
>> 68:                 ToggleNotifyJvmtiTest.sleep(1);
> 
> It looks like you do this short sleep 1 out of every 1,000,000 iterations. Can you explain why?

It is for yielding. Do you think we need this with a bigger frequency?

> test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java line 72:
> 
>> 70:             if (i > n) {
>> 71:                 i = 0;
>> 72:                 n = n - 1;
> 
> n--

This code was copied originally from the vmTestbase to SuspendThread* tests and some other tests.
I can do all suggested simplifications but not sure if it is really necessary.
It does not matter what exactly the method does because it just simulates some thread activity.
Would it better to keep copy/pasted methods the same?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1146998399
PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1146997072


More information about the serviceability-dev mailing list