RFR: 8372285: G1: Micro-optimize x86 barrier code [v4]

Aleksey Shipilev shade at openjdk.org
Mon Nov 24 08:14:04 UTC 2025


On Fri, 21 Nov 2025 18:27:55 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
>> 
>>  - Adjust label name
>>  - Merge branch 'master' into JDK-8372285-g1-barrier-micro
>>  - Make some backward branches explicitly short
>>  - Comment
>>  - Shorten a few more branches
>>  - Also reflow generate_pre_barrier_slow_path, so it is obvious the branches are short
>>  - More touchups
>>  - Also optimize queue insertion
>>  - Touchups
>>  - WIP
>
> src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp line 92:
> 
>> 90: void G1BarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
>> 91:                                                              Register addr, Register count, Register tmp) {
>> 92:   Label done;
> 
> Since you are touching this code can you add `L_` to labels in this code?
> This is our usual practice for labels to clear see them.

Done.

> src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp line 282:
> 
>> 280:   Register thread = r15_thread;
>> 281: 
>> 282:   Label done;
> 
> Please use `L_done`.

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28446#discussion_r2555031155
PR Review Comment: https://git.openjdk.org/jdk/pull/28446#discussion_r2555031433


More information about the hotspot-dev mailing list