On Wed, 3 Sep 2025 02:58:42 GMT, pf0n <d...@openjdk.org> wrote: >> src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp line 179: >> >>> 177: // Use object counting closure if ObjectCount or ObjectCountAfterGC >>> event is enabled. >>> 178: const bool object_count_enabled = >>> ObjectCountEventSender::should_send_event(); >>> 179: if (object_count_enabled && >>> !ShenandoahHeap::heap()->mode()->is_generational()) { >> >> Can the generational mode support this? It can also perform a _global_ >> collection. > > It could be possible to extend the object counting closure for GenShen. I > would have to look more deep into where the closure can be used.
GenShen shares the same marking closure as Shenandoah, but it is templatized differently. At surface level, we would just have to replace the marking closure used for the global collection with the object counting closure, but there might be other work to be done. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26977#discussion_r2317645883