RFR: 8271118: C2: StressGCM should have higher priority than frequency-based policy

Vladimir Kozlov kvn at openjdk.java.net
Thu Jul 22 22:07:27 UTC 2021


On Thu, 22 Jul 2021 05:34:40 GMT, Yi Yang <yyang at openjdk.org> wrote:

> I think StressGCM should have higher priority than frequency-based policy, otherwise StressGCM has no chance to choose because the frequency-based policy would choose block first if appropriately.

I need more explanation why we need this change. Why it is important to check StressGCM flag first?

`C->randomized_select(cand_cnt);` call only updates random number - does it matter in this case? Or it is your goal?

It is much cheaper to check LCA_freq first and only then load StressGCM flag and call `randomized_select()`.

If your goal is to update random number then I agree with @kelthuzadx suggestion to call it before check.

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

PR: https://git.openjdk.java.net/jdk/pull/4865


More information about the hotspot-compiler-dev mailing list