RFR: 8274178: G1: Occupancy value in IHOP logging and JFR event is inaccurate [v2]

Thomas Schatzl tschatzl at openjdk.org
Tue Nov 11 13:25:03 UTC 2025


On Tue, 11 Nov 2025 11:12:22 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> > previously IHOP logging used to report G1CollectedHeap::used() as occupancy (which is correct at a general level)
> 
> Instead of passing the pending-allocation-size as an arg, what do you think of adding a new API, `used_with_pending_allocation`, which is used when pending-alloc is also interesting to the caller?

First, we need a different `used` here - the old one counted young gen regions which are not interesting for starting concurrent mark. The second issue is a practical one: the pending-alloc is not stored in one place where we could get it, but in some temporary objects.

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

PR Comment: https://git.openjdk.org/jdk/pull/28175#issuecomment-3516914560


More information about the hotspot-gc-dev mailing list