RFR: 8261447: MethodInvocationCounters frequently run into overflow [v7]

Lutz Schmidt lucy at openjdk.java.net
Thu Feb 18 11:25:40 UTC 2021


On Thu, 18 Feb 2021 05:12:08 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Lutz Schmidt has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update copyright year
>
> src/hotspot/share/oops/method.cpp line 511:
> 
>> 509:   tty->cr();
>> 510: 
>> 511:   // Internal counting is based on signed int counters. They tend to
> 
> Is there a good reason to not simply make them unsigned int?

Well, depends on what you accept as a good reason. :-)

I decided to keep the counters as they are to limit the scope of the change. A grep for backedge_counter returns 94 lines, for example. Deep down, these counters are InvocationCounters, declared as uint. On their way up to the surface, they are treated signed or unsigned. Pretty inconsistent, yes. But a huge task to get it all straight, including checking/fixing assembly code. 

Is that reason enough?

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

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


More information about the hotspot-dev mailing list