RFR: 8339067: Convert Threshold flags (like Tier4MinInvocationThreshold and Tier3MinInvocationThreshold) to double [v2]

Vladimir Kozlov kvn at openjdk.org
Tue Oct 15 19:55:13 UTC 2024


On Tue, 15 Oct 2024 16:06:04 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> Instead of changing the `product` flags (is a CSR needed for that?), you could also just cast to `double` at every use site. Would that also work?

Yes, we need CSR for these changes if we do as they are now.  Have cast or assign to local variable is preferable, I agree.

> src/hotspot/share/opto/bytecodeInfo.cpp line 316:
> 
>> 314:       int call_site_count  = caller_method->scale_count(profile.count());
>> 315:       int invoke_count     = caller_method->interpreter_invocation_count();
>> 316:       assert(invoke_count >= 0, "require invocation count greater than zero");
> 
> Technically, the comment is now wrong. It is no longer "greater than" but "greater than or equal to zero". Is that intended? Otherwise you should use `>`.

Actually it should be `>` because we divide by it in next line.

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

PR Comment: https://git.openjdk.org/jdk/pull/21354#issuecomment-2414880608
PR Review Comment: https://git.openjdk.org/jdk/pull/21354#discussion_r1801823705


More information about the hotspot-compiler-dev mailing list