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

Thomas Stuefe stuefe at openjdk.org
Tue Jun 25 12:23:14 UTC 2024


On Tue, 25 Jun 2024 09:47:53 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Hmm. I am not sold on the "example" benefit. The array is quite easy in itself.
>> 
>> You could scratch the lists, since their implementations don't do anything to really test the AWFL (new acronym, yay). For the saved LOCs could expand the tests to test with a collection of various types, e.g.
>> - u1, u2, u8
>> - unaligned structures that need alignment (e.g. struct (void*; int; ))
>> - trivial objects
>> 
>> Interesting to see would be that it works, that alignment is correct, that nothing breaks across resizes (indexes stay stable, etc.).
>> 
>> I wont insist of it, just thinking that the current test complexity is somewhat wasted.
>
>>really test the AWFL (new acronym, yay).
> 
> Can't wait for templatized indices so I can write
> 
> ```c++
> using AWFUL = ArrayWithFreeListAllocator<int, uint8_t>;
> 
> 
>>Interesting to see would be that it works, that alignment is correct, that nothing breaks across resizes (indexes stay stable, etc.).
> 
>>I wont insist of it, just thinking that the current test complexity is somewhat wasted.
> 
> I think those tests make sense if we replace the `GrowableArray`as the backing memory area with something else, otherwise that's just testing the GA.
> 
> OK, how about we scrap the tests for when moving this to utilities and having the index being a part of the template? I've got that in the pipeline already, so it's not going to take too long I hope.

Fine for me

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

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


More information about the hotspot-dev mailing list