On Wed, 20 Nov 2024 00:01:49 GMT, Y. Srinivas Ramakrishna <y...@openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp line 474: >> >>> 472: // elision safe. >>> 473: return; >>> 474: } >> >> Why is this safe for Shenandoah? I suspect it needs >> `CardTableBarrierSet::on_slowpath_allocation_exit` to work. `G1BarrierSetC2` >> gets it by subclassing `CardTableBarrierSetC2`. But `ShenandoahBarrierSetC2` >> does not. Should it? > > Good question. I'm tracking at https://bugs.openjdk.org/browse/JDK-8344593 , > and will follow up there. A code review indicates that the code is fine, but the comment could be improved. A quick test of performance didn't indicate (with specjbb) any difference in performance (done only for GenShen) but a more complete suite of performance tests is being run to assess the efficacy of the optimization. I'm inclined to leave this in, since eliding card-marks doesn't hurt, even if it doesn't seem to help much either. The comment will be adjusted as part of the above ticket. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21273#discussion_r1859698145