RFR: 8373720: GenShen: Count live-at-old mark using Snapshot at Beginning [v4]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Dec 17 16:04:08 UTC 2025
On Tue, 16 Dec 2025 23:12:19 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
> Looks good to me. Just curious if it changes performance with any of the standard benchmarks?
>
I don't see measurable impact on any standard benchmarks. I have witnessed situations when studying GC logs where the live data at previous old GC has been somewhat unreliable due to very long (lots of interruptions) old marking efforts and lots of floating garbage.
> 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. Oh, and may be state when it's valid to read its value for a region (i.e. between marking cycles for that region). (Random thought: can promotion in place just clear this value at promotion and save the check you have for old gen, or could that cause issues elsewhere?)
Thanks. I've added some comments.
I think we don't want to overwrite live-data at promote-in-place time. It seems that information can be useful to other heuristics, though I don't think we make use of it at the moment.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28837#issuecomment-3666015960
PR Review Comment: https://git.openjdk.org/jdk/pull/28837#discussion_r2627629678
More information about the hotspot-gc-dev
mailing list