RFR: 8003216: Add JFR event indicating explicit System.gc() call
Jaroslav Bachorik
jbachorik at openjdk.java.net
Thu Jun 10 10:24:13 UTC 2021
On Thu, 10 Jun 2021 08:24:54 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
> Hi,
>
> This is a continuation of a review that started before the pandemic.
>
> In an offline discussion with Stefan Johansson, we looked into adding GC id to the SystemGC event, but it was not trivial. Still, it would make sense to have this event to see the stack trace of the System GC call. GC id can always be added as another enhancement. I added a field that indicates the status of -XX:+ExplicitGCInvokesConcurrent, to hint to users that the duration of the event may not be the time the GC took.
>
> I only emit the event if a GC is triggered, so there is no need for a field -XX:+DisableExplicitGC which we talked about back then. The reason is that it could potentially create many events in the default configuration, for example if called every rendered frame. I also think users want to track calls that actually led to a GC. If there is a need for a second field, it could be added as another enhancement later.
>
> Testing: tier1/tier2 + test/jdk/jdk/jfr
>
> Thanks
> Erik
Marked as reviewed by jbachorik (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/4456
More information about the hotspot-gc-dev
mailing list