8257906: JFR: RecordingStream leaks memory #1774
This fix takes care of two memory-leaks that happen when using the RecordingStream in its default configuration.
The first leak happens due to a cache being filled up, but not reset after a chunk segment has been parsed. The second leak is more subtle and happens because objects are created on the heap to track an increased number of chunk files in the disk repository.
Emitted and parsed about 3 000 chunks and checked the heap usage after GC. A slight increase (10 kb) could be seen over time, resulting in on average 1-2 bytes per million events, but could be due to compressed integers using more space in byte arrays during loading. More time could be spent investigating this, but I like to get these fixes in as soon as possible.
Heap histogram is stable for the important data structures.
@egahlin This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 83 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
@egahlin Since your change was applied there have been 93 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit 3c66485.