RFR: 8312132: Add tracking of multiple address spaces in NMT [v105]

Johan Sjölen jsjolen at openjdk.org
Sat May 25 09:03:14 UTC 2024


On Fri, 24 May 2024 06:54:24 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Lower number of pages
>
> src/hotspot/share/nmt/nmtNativeCallStackStorage.hpp line 80:
> 
>> 78:       }
>> 79:       link = link->next;
>> 80:     }
> 
> Good. We do an youngest-first search if I am seeing right. Was that deliberate? The chance of the most recent callstacks reoccurring is a lot higher than seeing older stacks.

It wasn't deliberate at all, I have no idea of temporal locality of specific stack traces. I guess that makes sense, Metaspace tends to do a lot of allocations clustered closely in time for example. Anyway, you are right, that is what we do.

> src/hotspot/share/nmt/nmtNativeCallStackStorage.hpp line 92:
> 
>> 90:   // 4099 gives a 50% probability of collisions at 76 stacks (as per birthday problem).
>> 91:   static const constexpr int default_nr_buckets = 4099;
>> 92:   int _nr_buckets;
> 
> isn't this normally called table_size or somesuch? _nr_buckets sounds like number of items, which this is not.

I think table_size is more established in Hotspot, I'll switch.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1614483890
PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1614486106


More information about the hotspot-dev mailing list