RFR: 8275527: Refactor forward pointer access [v5]
Roman Kennke
rkennke at openjdk.java.net
Wed Nov 10 12:52:08 UTC 2021
> Accessing the forward pointer is currently a little inconsistent. Some code paths call oopDesc::forwardee() / oopDesc::is_forwarded(), some code paths call forwardee() and check it for ==/!= NULL, some code paths even call markWord::decode_pointer() and markWord::is_marked() instead.
>
> This change attempts to make the situation more consistent. For simple cases it preserves oopDesc::forwardee() / is_forwarded(), some cases need to use the markWord for consistency in concurrent GC, they now use markWord::forwardee() and markWord::is_forwarded(). Also, checking whether or not an object is forwarded is now consistently done using is_forwarded() and not by checking forwardee ==/!= NULL. This also resolves the mess in G1 full GC that changes not-forwarded objects to have a NULL (fake-) pointer. This is not necessary, because we can just as well use the lock bits to determine whether or not the object is forwarded.
>
> Testing:
> - [x] tier
> - [x] tier2
> - [x] hotspot_gc
Roman Kennke has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits:
- Merge branch 'master' into optimize-fwdptr
- Don't use forwarded terminology in markWord
- Move forward impl into markWord and add assert
- Fix Parallel GC mistake
- Revert unnecessary changes
- Update some copyright headers
- Add missing includes
- Merge branch 'master' into optimize-fwdptr
- Add missing includes
- Rename mwd -> fwd
- ... and 4 more: https://git.openjdk.java.net/jdk/compare/a0b84453...d63962a3
-------------
Changes: https://git.openjdk.java.net/jdk/pull/5955/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5955&range=04
Stats: 46 lines in 9 files changed: 4 ins; 26 del; 16 mod
Patch: https://git.openjdk.java.net/jdk/pull/5955.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5955/head:pull/5955
PR: https://git.openjdk.java.net/jdk/pull/5955
More information about the shenandoah-dev
mailing list