RFR: 8373720: GenShen: Count live-at-old mark using Snapshot at Beginning [v4]

Y. Srinivas Ramakrishna ysr at openjdk.org
Tue Dec 16 23:15:22 UTC 2025


On Tue, 16 Dec 2025 17:28:03 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Live memory in old is measured as of the start of old-generation concurrent marking.
>> 
>> Memory promoted during concurrent old marking (memory above TAMS for the old-generation heap regions) and memory regions promoted in place during concurrent old marking are excluded from the total live data at start of old marking.
>
> Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - Merge remote-tracking branch 'jdk/master' into fix-live-data-at-old-mark-gh
>  - fix up comments
>  - Merge remote-tracking branch 'jdk/master' into fix-live-data-at-old-mark
>  - do not count promoted-in-place live data toward TAMS old live data

Looks good to me. Just curious if it changes performance with any of the standard benchmarks?

🚢

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp line 390:

> 388:   inline bool has_live() const;
> 389:   inline size_t get_live_data_bytes() const;
> 390:   inline size_t get_live_data_words() const;

May be add a 1-line documentation for this API stating that this is the total size of objects under TAMS marked by the most recent marking cycle for that region.

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

Marked as reviewed by ysr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28837#pullrequestreview-3585330418
PR Review Comment: https://git.openjdk.org/jdk/pull/28837#discussion_r2625048418


More information about the hotspot-gc-dev mailing list