RFR: 8292265: Add old gen used field at G1HeapSummary JFR event.

Thomas Schatzl tschatzl at openjdk.org
Wed Nov 23 18:16:57 UTC 2022


On Tue, 22 Nov 2022 23:09:52 GMT, Sangheon Kim <sangheki at openjdk.org> wrote:

> Hi all,
> 
> Can I have reviews for this change which adds 'old gen used' field at existing G1HeapSummary event?
> 
> Testing: tier1 ~ tier3
> 
> Thanks,
> Sangheon

Changes requested by tschatzl (Reviewer).

src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 2568:

> 2566: 
> 2567:   size_t old_used_bytes = _monitoring_support->old_gen_used();
> 2568: 

On the one hand using the information from the MXBeans/MonitoringSupport and on the other hand recalculating this data manually, is likely to set us up for inconsistencies.
I recommend using `MonitoringSupport` data for as many as possible values here.

>From what I can see for young gc, this method is called as part of the `G1JFRTracerMark` which encloses the `G1MonitoringScope`, i.e. the data from `MonitoringSupport` is all up to date. Same seems to be true for full gc.

So getting all data from `MonitoringSupport` here is imo the best way to get consistent data vs. using parts of that data and recalculating others manually.

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

PR: https://git.openjdk.org/jdk/pull/11303


More information about the hotspot-jfr-dev mailing list