RFR: 8275415: Prepare Leak Profiler for Lilliput
Roman Kennke
rkennke at openjdk.java.net
Mon Oct 18 18:29:59 UTC 2021
On Mon, 18 Oct 2021 17:31:13 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
> Greetings,
>
> Currently, the associated chain for a leak candidate (represented by the leak context edge) is stored as a pointer in the mark word. With Lilliput, this will not work.
>
> Providing another hashtable works fine to solve this problem, but the overhead might not fully warrant it. The default hashtable has 1009 buckets IIRC, but the number of leak candidates (samples) found during heap traversal might only be a relatively small number (default queue size is 256).
>
> A solution is to still use space available in the mark word, since we have already provisioned to use this as a "scratch area" as part of setup. It is now limited to accommodate the anticipated changes under the Lilliput project (i.e. restricted to only use the lower 32-bits) and instead of storing a pointer to the leak context edge, we store an index into an array.
>
> Testing: jdk_jfr
>
> Thanks
> Markus
The change looks good to me, and I can confirm that it works as intended in the context of Lilliput. Thank you!
-------------
Marked as reviewed by rkennke (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5992
More information about the hotspot-jfr-dev
mailing list