RFR: 8239423: [TESTBUG] jdk/jfr/jvm/TestJFRIntrinsic.java failed with -XX:-TieredCompilation

David Holmes david.holmes at oracle.com
Thu Feb 20 13:08:01 UTC 2020


On 20/02/2020 8:33 pm, Ao Qi wrote:
>> Ah! Now I see the problem. In WhiteBox we have:
>>
>>     if (comp_level > MIN2((CompLevel) TieredStopAtLevel,
>> CompLevel_highest_tier)) {
>>       tty->print_cr("WB error: invalid compilation level %d", comp_level);
>>       return false;
>>     }
>>
>> but TieredStopAtLevel should be ignored when tiered compilation is
>> disabled, or not present. I actually think it is a bug that the VM
>> allows you to set TieredStopAtLevel even though it is ignored on those
>> configurations. The WB code should be changed to something like:
>>
>> #ifdef TIERED
>>     CompLevel cl_min = MIN2((CompLevel) TieredStopAtLevel,
>> CompLevel_highest_tier);
>> #else
>>     CompLevel cl_min = CompLevel_highest_tier;
>> #endif
>>     if (comp_level > cl_min) {
>>       tty->print_cr("WB error: invalid compilation level %d", comp_level);
>>       return false;
>>     }
>>
>> There are other places in WhiteBox that need similar fixes.
> 
> Could you give some comments or advice on this one:
> http://cr.openjdk.java.net/~aoqi/8239423/webrev.01/ ?
> 
> I think TieredStopAtLevel should be ignored when
> -XX:-TieredCompilation is used (even a build with tiered
> configration), so I used TieredCompilation to determine the cl_min,
> not "#ifdef TIERED". What do you think?

Yes you are quite right! That is the correct way to handle this.

I assume the test passes in all combinations now?

Thanks,
David

> Cheers,
> Ao Qi
> 


More information about the hotspot-dev mailing list