RFR: 8371284: GenShen: Avoid unnecessary card marking

William Kemper wkemper at openjdk.org
Fri Nov 7 21:44:01 UTC 2025


On Fri, 7 Nov 2025 20:42:25 GMT, Nityanand Rai <duke at openjdk.org> wrote:

> Exclude young-young, old-old and honor UseCondCardMark in dirty card marking.

Let's make sure we don't mark cards for null objects.

src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp line 200:

> 198:   // Exclude old-old
> 199:   T heap_oop = RawAccess<>::oop_load(field);
> 200:   if (!CompressedOops::is_null(heap_oop)) {

We can return early if `CompressedOops::is_null` (we don't need to remember old pointers that are null).

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

Changes requested by wkemper (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28204#pullrequestreview-3436538439
PR Review Comment: https://git.openjdk.org/jdk/pull/28204#discussion_r2505630257


More information about the hotspot-gc-dev mailing list