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

Ao Qi aoqi at loongson.cn
Thu Feb 20 10:33:10 UTC 2020


> 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?

Cheers,
Ao Qi



More information about the hotspot-dev mailing list