RFR: 8295457: Make the signatures of write barrier methods consistent
Zixian Cai
duke at openjdk.org
Tue Oct 18 07:32:59 UTC 2022
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.
-------------
Commit messages:
- Fix store_heap_oop
- Fix access_store_at
Changes: https://git.openjdk.org/jdk/pull/10739/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10739&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8295457
Stats: 23 lines in 7 files changed: 0 ins; 0 del; 23 mod
Patch: https://git.openjdk.org/jdk/pull/10739.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10739/head:pull/10739
PR: https://git.openjdk.org/jdk/pull/10739
More information about the hotspot-dev
mailing list