RFR: 8274178: Occupancy value in logging and JFR event is inaccurate in G1IHOPControl
Thomas Schatzl
thomas.schatzl at oracle.com
Mon Oct 11 11:25:19 UTC 2021
Hi,
On 09.10.21 00:19, Man Cao wrote:
> Do we want to rename the wording "current occupancy" and "occupancy" in
> logging to something else? If we keep them as
> G1CollectedHeap::heap()->used(), it is inconsistent with the other
> logging message in G1Policy::need_to_start_conc_mark():
>
> bool G1Policy::need_to_start_conc_mark(const char* source, size_t
> alloc_word_size) {
> ...
> size_t cur_used_bytes = _g1h->non_young_capacity_bytes();
> ...
> if (marking_request_bytes > marking_initiating_used_threshold) {
> ...
> log_debug(gc, ergo, ihop)("%s occupancy: " SIZE_FORMAT "B
> allocation request: " SIZE_FORMAT "B threshold: " SIZE_FORMAT "B (%1.2f)
> source: %s",
> result ? "Request concurrent cycle
> initiation (occupancy higher than threshold)" : "Do not request
> concurrent cycle initiation (still doing mixed collections)",
> cur_used_bytes, alloc_byte_size,
> marking_initiating_used_threshold, (double)
> marking_initiating_used_threshold / _g1h->capacity() * 100, source);
> }
> }
>
> The "occupancy" value in this message is already non_young_capacity_bytes().
>
> Also, if we report both heap()->used() and non_young_capacity_bytes() in
> log, which value should we use for "current_occupancy" in
> G1NewTracer::report_basic_ihop_statistics() and
> G1NewTracer::report_adaptive_ihop_statistics()?
>
just fix it elsewhere as well, as well adding the field to the JFR events.
JFR recordings are self-describing, so this should not be an issue wrt
to backwards compatibility for future recordings.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list