RFR: 8259776: Remove ParallelGC non-CAS oldgen allocation [v4]
Kim Barrett
kbarrett at openjdk.java.net
Sat Jan 23 22:51:00 UTC 2021
> Please review this change to ParallelGC oldgen allocation. There were two
> variants, one using CAS on the _top member of the mutable space, the other
> requiring locking or other forms of mutual exclusion.
>
> We don't need both variants. The non-CAS variant is only used in a few
> places, where the cost of an extra CAS doesn't matter. What does matter is
> that having two variants, which must not be used concurrently, makes the
> code larger, more complex, and harder to verify. (This change came out of
> analyzing JDK-8259271. No problems were found (or expected), so this change
> is not expected to impact that bug. But because of the two variants, the
> possibility of unexpected interact needed to be examined.)
>
> The non-CAS allocation support has been removed, with PSOldGen::allocate now
> implemented using the CAS-based allocation. The cas_ prefix naming
> convention is retained for the internals for clarity.
>
> While looking at this, noticed and removed a couple of lingering references
> to the class AdjoiningGenerations, which no longer exists after JDK-8243146.
>
> Testing:
> mach5 tier1-5
Kim Barrett 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 four additional commits since the last revision:
- Merge branch 'master' into nocas_alloc
- move oldgen alloc with size policy recording to heap object
- record oldgen mutator allocations in size policy
- remove non-CAS allocate
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/2101/files
- new: https://git.openjdk.java.net/jdk/pull/2101/files/994c0eb6..11ca7991
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2101&range=03
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2101&range=02-03
Stats: 29337 lines in 598 files changed: 8628 ins; 16330 del; 4379 mod
Patch: https://git.openjdk.java.net/jdk/pull/2101.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2101/head:pull/2101
PR: https://git.openjdk.java.net/jdk/pull/2101
More information about the hotspot-gc-dev
mailing list