RFR: 8313882: Fix -Wconversion warnings in runtime code [v2]
Coleen Phillimore
coleenp at openjdk.org
Wed Aug 9 13:24:02 UTC 2023
On Wed, 9 Aug 2023 01:49:43 GMT, Dean Long <dlong at openjdk.org> wrote:
>> I think there were less casts this way, since sum and weighted sum had to be turned into double more than histo[i], but it does make more sense to use int for summing the numbers, and cast to double for printing.
>
> I don't know how big these values are, but if they were large then uint64_t sum could overflow.
uint64_t count = (uint64_t)method->compiled_invocation_count();
They seem to be a sum of compiled_invocation_count() so maybe double is best.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15177#discussion_r1288453974
More information about the hotspot-dev
mailing list