RFR(M): 8203883: Remove State from InvocationCounters
Nils Eliasson
nils.eliasson at oracle.com
Wed Feb 12 20:09:43 UTC 2020
Good suggestions!
On 2020-02-12 13:26, Claes Redestad wrote:
> Hi,
>
> I like it!
>
> + private: // bit no: |29 1| 0 |
> + uint _counter; // format: [count|carry|
>
> Shouldn't the 29 still be 31?
Yes it should. My first though was to keep the amount of bits in the
counter to keep the same behavior. But in the current version it uses
all the bits, and the comment should reflect that. Fixed.
>
> All overloads of disable_compilation() is now a no-op - can these
> be removed?
Yes! Removed.
>
> With only a carry bit left did you consider flipping the bit order
> (highest bit as carry)? Probably doesn't matter for performance, but
> might simplify some code (less shifts, count++, ..)
I think we can just get rid of the carry flag and make sure the highest
bit is kept when the counter is reduced. But I would like to do that in
a separate change. This patch so far changes no behavior (except for
the two additional bits for the counter). And I would like to verify
them separately.
New webrev: http://cr.openjdk.java.net/~neliasso/8203883/webrev.03/
I will do some performance verification before pushing.
Thanks!
// Nlis
>
> Thanks!
>
> /Claes
>
> On 2020-02-12 08:58, Nils Eliasson wrote:
>> Hi,
>>
>> This is a clean-up of the invocation counters. The original
>> observation is that the action() method on invocationCounter is never
>> used, which means the actions are never accessed. There are also
>> init-values, but they are always the same regardless of state, so
>> they can be removed too. And when both the action and init values are
>> gone, the state has no use anymore and can be removed too. This
>> simplifies the InvocationCounter a lot.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8203883
>> Webrev: http://cr.openjdk.java.net/~neliasso/8203883/webrev.02
>>
>> Please review,
>>
>> Nils Eliasson
>>
>>
>>
More information about the hotspot-compiler-dev
mailing list