RFR: 8257906: JFR: RecordingStream leaks memory

Markus Grönlund mgronlun at openjdk.java.net
Tue Dec 15 18:21:56 UTC 2020


On Tue, 15 Dec 2020 00:32:26 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> Hi,
> 
> 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.
> 
> Testing:  jdk/jdk/jfr
> 
> 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.
> 
> Thanks
> Erik

Marked as reviewed by mgronlun (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/1774


More information about the hotspot-jfr-dev mailing list