RFR: 8372412: Increase buffer size for ring-buffer events in CollectedHeap
Joel Sikström
jsikstro at openjdk.org
Tue Nov 25 14:55:19 UTC 2025
On Mon, 24 Nov 2025 14:20:42 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Hello,
>>
>> The buffer size we changed to when separating GC and Metaspace printing code is too small for Parallel and Serial (and maybe also for long-running programs in general). I suggest we bump the buffer-size to 1024 bytes. This also leaves room for more lengthy prints, which ZGC might have if running on a machine with many NUMA nodes.
>>
>> The default number of events stored in each ring-buffer is 20, controlled via the diagnostic flag `LogEventsBufferEntries`. In it's default setting, the total memory usage of each ring-buffer (Metaspace and Heap) will increase from (512 bytes * 20) 10KB to (1024 * 20) 20KB.
>>
>> For completeness, the content of the ring-buffers are only printed in hs_err files, using the `-XX:+PrintVMInfoAtExit` (diagnostic flag) or using `jcmd VM.info`
>>
>> Testing:
>> * Local testing with `java -XX:+UseParalellGC/UseSerialGC -XX:+PrintVMInfoAtExit ...` to see that the message is not cut-off any longer.
>
> Marked as reviewed by stefank (Reviewer).
Thank you for the reviews! @stefank @tschatzl
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28476#issuecomment-3576051184
More information about the hotspot-gc-dev
mailing list