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

Aleksey Shipilev shade at openjdk.java.net
Tue Jan 11 11:10:32 UTC 2022


On Mon, 10 Jan 2022 13:40:29 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> 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

Zero changes look fine to me. A good smoke test for Zero is `make bootcycle-images`, and it passes on Linux x86_64 for me with this patch. 

The rest looks good too.

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

Marked as reviewed by shade (Reviewer).

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


More information about the hotspot-dev mailing list