RFR: 8333658: NMT: Use an allocator with 4-byte pointers to save memory in NativeCallStackStorage [v21]

Thomas Stuefe stuefe at openjdk.org
Thu Jun 20 05:56:17 UTC 2024


On Thu, 20 Jun 2024 05:25:59 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:
>> 
>>   Fix tests
>
> src/hotspot/share/nmt/nmtNativeCallStackStorage.hpp line 44:
> 
>> 42: // We achieve this by using a closed hashtable for finding previously existing NCS:s and referring to them by an index that's smaller than a pointer.
>> 43: template<template<typename, MEMFLAGS> class ALLOCATOR>
>> 44: class NativeCallStackStorageWithAllocator : public CHeapObj<mtNMT> {
> 
> I don't think we need a templatized version of NativeCallStackStorage. Please let's keep it simple and stupid. We will only ever have one form of NativeCallStackStorage.
> 
> Should we ever need multiple forms of NativeCallStackStorage simultaneously, we can still templatize.

Making this a template also makes it difficult to move implementation over to a cpp file. Something which you really should do, since the implementation here is non-trivial.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18979#discussion_r1646993299


More information about the hotspot-dev mailing list