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

David Holmes david.holmes at oracle.com
Thu Feb 18 12:56:15 UTC 2021


On 18/02/2021 9:25 pm, Lutz Schmidt wrote:
> 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?

I guess so :) It sounds terribly messy and confused.

Thanks,
David

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


More information about the serviceability-dev mailing list