RFR: 8288327: Executable.hasRealParameterData should not be volatile [v5]
Сергей Цыпанов
duke at openjdk.org
Thu Jun 30 11:55:34 UTC 2022
> If there are two threads calling `Executable.hasRealParameterData()` under race and the first one writes into volatile `Executable.parameters` field (doing _releasing store_) and the second thread reads non-null value from the same field (doing acquiring read) then it must read exactly the same value written into `hasRealParameterData` within `privateGetParameters()`. The reason for this is that we assign `hasRealParameterData` before _releasing store_.
>
> In the opposite case (_acquiring read_ reads null) the second thread writes the value itself and returns it from the method so there is no change in behavior.
Сергей Цыпанов 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 six additional commits since the last revision:
- 8288327: Move ParameterData declaration closer to its usage
- 8288327: Mark ParameterData.parameters as @Stable and rename real -> isReal
- Merge branch 'master' into 8288327
- 8288327: Use record store
- 8288327: Add clarifying comments
- 8288327: Executable.hasRealParameterData should not be volatile
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/9143/files
- new: https://git.openjdk.org/jdk/pull/9143/files/8ead0357..711e175f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=9143&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=9143&range=03-04
Stats: 58742 lines in 1081 files changed: 35110 ins; 11520 del; 12112 mod
Patch: https://git.openjdk.org/jdk/pull/9143.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9143/head:pull/9143
PR: https://git.openjdk.org/jdk/pull/9143
More information about the core-libs-dev
mailing list