Integrated: 8295457: Make the signatures of write barrier methods consistent
Zixian Cai
duke at openjdk.org
Tue Oct 18 15:35: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.
This pull request has now been integrated.
Changeset: 5dbd4951
Author: Zixian Cai <u5937495 at anu.edu.au>
Committer: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/5dbd49511518819acbbff9968cdf426af759cf2c
Stats: 23 lines in 7 files changed: 0 ins; 0 del; 23 mod
8295457: Make the signatures of write barrier methods consistent
Reviewed-by: tschatzl, shade
-------------
PR: https://git.openjdk.org/jdk/pull/10739
More information about the hotspot-dev
mailing list