RFR: 8325671: Shenandoah: Introduce a ShenandoahGenerationType and templatize certain marking closures with it [v4]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Fri Feb 16 07:52:55 UTC 2024
On Thu, 15 Feb 2024 17:15:54 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahMark.cpp line 92:
>>
>>> 90:
>>> 91: template<bool CANCELLABLE, StringDedupMode STRING_DEDUP>
>>> 92: void ShenandoahMark::mark_loop(ShenandoahGenerationType generation /* ignored */, uint worker_id, TaskTerminator* terminator, ShenandoahReferenceProcessor *rp, StringDedup::Requests* const req) {
>>
>> I think `/* ignored */` is not needed here.
>>
>> Also, the argument list line is probably too long. AFAICS, we put the arguments we curry from method arguments to template arguments at very end. See how the method arguments are entering the template arguments in the same order:
>>
>>
>> template<bool CANCELLABLE, StringDedupMode STRING_DEDUP>
>> void ShenandoahMark::mark_loop(uint worker_id, TaskTerminator* terminator, ShenandoahReferenceProcessor *rp,
>> ShenandoahGenerationType generation, StringDedup::Requests* const req) ...
>>
>> void ShenandoahMark::mark_loop(uint worker_id, TaskTerminator* terminator, ShenandoahReferenceProcessor *rp,
>> bool cancellable, StringDedupMode dedup_mode, ShenandoahGenerationType generation, StringDedup::Requests* const req ...
>
> I'll fix the order so it conforms to that convention; thanks for pointing it out!
Adjusted order of parms to be consistent with order in templated functions, and fixed long lines.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17815#discussion_r1492072147
More information about the shenandoah-dev
mailing list