RFR: 8279534: Consolidate and remove oopDesc::klass_gap methods

Roman Kennke rkennke at openjdk.java.net
Mon Jan 10 20:16:44 UTC 2022


After JDK-8278568, these methods are unused:
  inline int klass_gap() const;
  inline void set_klass_gap(int z);

Except Zero which uses set_klass_gap(int), but we agreed elsewhere (#5585) that we don't want to access partly initialized oops as such. We should use the HeapWord* initialization variants in Zero, too.

Note: we could take that even further and replace the initialization in Zero with ObjAllocator::initialize() call, but that would also have to remove the storestore fence, and possibly adopt ObjAllocator to avoid clearing in already-zeroed TLABs, all of which would have wider consequences and would be a matter for separate PR.

Testing:
 - [x] Build (for klass_gap methods removal)
 - [ ] GHA for Zero stuff

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

Commit messages:
 - Reinstate storestore fence
 - Use HeapWord* based oop initializers in Zero
 - 8279534: Unused oopDesc::klass_gap methods after JDK-8278568

Changes: https://git.openjdk.java.net/jdk/pull/7008/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7008&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279534
  Stats: 18 lines in 3 files changed: 3 ins; 13 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7008.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7008/head:pull/7008

PR: https://git.openjdk.java.net/jdk/pull/7008


More information about the hotspot-dev mailing list