RFR: 8315559: Delay TempSymbol cleanup to avoid symbol table churn [v6]

Coleen Phillimore coleenp at openjdk.org
Thu Nov 9 15:30:14 UTC 2023


On Thu, 9 Nov 2023 14:11:08 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:

>> Oli Gillespie has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add missing atomic.hpp include
>
> src/hotspot/share/oops/symbolHandle.hpp line 99:
> 
>> 97:     if (!_cleanup_delay_enabled) return;
>> 98:     sym->increment_refcount();
>> 99:     uint i = Atomic::add(&_cleanup_delay_index, 1u) % CLEANUP_DELAY_MAX_ENTRIES;
> 
> When this wraps around, it will skip a few values - but I don't see a problem with that.
> 
> 
> x = 4294967293, x % 100 = 93
> x = 4294967294, x % 100 = 94
> x = 4294967295, x % 100 = 95
> x = 0, x % 100 = 0
> x = 1, x % 100 = 1
> x = 2, x % 100 = 2

I don't see a problem either.  I wish I were better with integers.  I was wondering if the max entries should be a power of two to make the % operation faster.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16398#discussion_r1388166622


More information about the hotspot-dev mailing list