On Tue, 25 Feb 2025 06:03:21 GMT, Ashutosh Mehra <asme...@openjdk.org> wrote:
>> Thomas Stuefe has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contains one >> new commit since the last revision: >> >> avoid Thread::current in high traffic chunk alloc path > > src/hotspot/share/memory/arena.hpp line 48: > >> 46: const size_t _len; // Size of this Chunk >> 47: // Used for Compilation Memory Statistic >> 48: uint64_t _stamp; > > This is wasted space if compilation memory stats is not enabled. One way to > avoid this is to subclass `Chunk` as a `StampedChunk` and use that if > compilation memory stats is enabled. Is this complexity worth the space > saving? I'd like to avoid that complexity. Arena coding is already needlessly complex. Note that a chunk is variable-sized and typically 1Kb in size or larger, and we should not have that many chunks in live arenas at any given moment (some hundred maybe). Note also that using 8 bytes seems wasteful, but the payload section has to be aligned to void* anyway. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23530#discussion_r1970128193