RFR: Merge jdk-21-ga [v2]

Jiangli Zhou jiangli at openjdk.org
Wed Apr 17 22:53:56 UTC 2024


> JDK 21 merge command: `$ git merge --no-ff jdk-21-ga`
> 
> Most manual merge for conflicts are mechanical.
> 
> - src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
> - src/hotspot/cpu/x86/templateTable_x86.cpp
> Add extra `noreg` arg to `access_store_at` in `TemplateTable::lastore` and friends.
> 
> - src/hotspot/share/runtime/mutexLocker.cpp
> Update TsanOopMap_lock to use MUTEX_DEFN.
> 
> - src/hotspot/share/runtime/sharedRuntime.cpp
> Update unused_reg_map() to reflect RegisterMap change.
> 
> Additional updates:
> 
> - Field access flags related (related to https://github.com/openjdk/jdk21/commit/bfb812a8ff8bca70aed7695c73f019ae66ac6f33 change)
> Change TSAN specific field access flag, JVM_ACC_FIELD_TSAN_IGNORE to be a FieldFlags, _ff_tsan_ignore. Add is_tsan_ignore() and update_tsan_ignore in FieldFlags and replace the existing usages in various places to use the FieldFlags functions for the tsan_ignore flag. Remove the old is_tsan_ignore() and set_tsan_ignore() from FieldInfo.
> 
> - init_lock related (related to https://github.com/jianglizhou/tsan/commit/9099f3e7b58deec50cd8af9db49b2b2e564a6bfe changes)
> In instanceKlass.cpp, change to do SharedRuntime::tsan_acquire and SharedRuntime::tsan_release on the class mirror. 
> 
> In JDK 21, there is no eager_initialization (removed by https://github.com/openjdk/jdk/commit/cec23b1b078cd0c82063dda1af5a54ea561855c9). So we now only have SharedRuntime::tsan_acquire in InstanceKlass::initialize and SharedRuntime::tsan_release in InstanceKlass::set_initialization_state_and_notify with the latest version.
> 
> In InstanceKlass::set_initialization_state_and_notify, only do SharedRuntime::tsan_release for the mirror if
>   the state is fully_initialized.
> 
> Remove the code for loading the address of init_lock in src/hotspot/cpu/x86/templateTable_x86.cpp and
>   src/hotspot/cpu/aarch64/templateTable_aarch64.cpp. SharedRuntime::tsan_acquire calls are done with 
>   `obj`.
> 
> Testing:
> 
> Built with following config:
> 
> 
> $ bash configure --with-boot-jdk=/usr/local/google/home/jianglizhou/openjdk/jdk-21.0.1 --with-debug-level=release --disable-warnings-as-errors --with-jtreg=/usr/local/google/home/jianglizhou/github/jtreg/build/images/jtreg --with-stdc++lib=static --disable-precompiled-headers --enable-unlimited-crypto --with-native-debug-symbols=internal --with-default-make-target=jdk-image --disable-warnings-as-errors --with-toolchain-type=clang --disable-warnings-as-errors
> 
> 
> 
> $ make test TEST=hotspot/jtreg/tsan
> 
> 
> 
> ==============================
> Test summary
> ==================...

Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:

  Address review comments in https://github.com/openjdk/tsan/pull/18#issuecomment-2060654960.

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

Changes:
  - all: https://git.openjdk.org/tsan/pull/18/files
  - new: https://git.openjdk.org/tsan/pull/18/files/b2da2298..b90c974d

Webrevs:
 - full: Webrev is not available because diff is too large
 - incr: https://webrevs.openjdk.org/?repo=tsan&pr=18&range=00-01

  Stats: 16 lines in 5 files changed: 2 ins; 4 del; 10 mod
  Patch: https://git.openjdk.org/tsan/pull/18.diff
  Fetch: git fetch https://git.openjdk.org/tsan.git pull/18/head:pull/18

PR: https://git.openjdk.org/tsan/pull/18


More information about the tsan-dev mailing list