RFR: 8295457: Make the signatures of write barrier methods consistent
Aleksey Shipilev
shade at openjdk.org
Tue Oct 18 08:21:04 UTC 2022
On Tue, 18 Oct 2022 04:18:13 GMT, Zixian Cai <duke at openjdk.org> wrote:
> Currently, the signatures for various write barrier related methods are inconsistent and can be a bit confusing. Let's take x86 as an example.
>
> The `store_at` of `BarrierSetAssembler` uses `dst` and `val`, and similarly for `oop_store_at` of `CardTableBarrierSetAssembler`.
>
> https://github.com/openjdk/jdk/blob/358ac07255cc640cbcb9b0df5302d97891a34087/src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.hpp#L50
>
> https://github.com/openjdk/jdk/blob/358ac07255cc640cbcb9b0df5302d97891a34087/src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.hpp#L38
>
> However, `access_store_at` and `store_heap_oop` of `MacroAssembler` use `dst` and `src`, presumably copied from `access_load_at` and `load_heap_oop` respectively.
>
> https://github.com/openjdk/jdk/blob/358ac07255cc640cbcb9b0df5302d97891a34087/src/hotspot/cpu/x86/macroAssembler_x86.hpp#L355
>
> https://github.com/openjdk/jdk/blob/358ac07255cc640cbcb9b0df5302d97891a34087/src/hotspot/cpu/x86/macroAssembler_x86.hpp#L362
>
> This PR cleans up the signature of write barrier methods across affected architectures, hopefully making them less confusing.
Do you want to check `macroAssembler_ppc.*`, `macroAssembler_arm.*` too?
-------------
PR: https://git.openjdk.org/jdk/pull/10739
More information about the hotspot-dev
mailing list