RFR: 8139457: Array bases are aligned at HeapWord granularity [v17]

Roman Kennke rkennke at openjdk.org
Tue Feb 14 08:33:23 UTC 2023


On Fri, 27 Jan 2023 17:12:37 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> I'm following occurrences of header_size() in the code because that might be where we have assumptions about where the payload for oops starts. Ignoring the occurrences from metadata, there is one unused one in instanceOop.hpp, not related to your change that I think should be removed. The one OopDesc::header_size() is used by min_dummy_object_size and min_fill_size in CollectedHeap. These usages look okay to me but if they were rewritten to use heap_word_size(), maybe that would be better.
> 
> I ran tier1-8 on this for linux-x64-debug with no failures.

Thanks, Coleen, for reviewing. I already removed the one occurance of header_size() in instanceOop.hpp. The oopDesc::header_size() is problematic not only because it assumes word-aligned object header, but also because it depends on sizeof(oopDesc) - with Lilliput, this will no longer be a useful way to measure. However, I'd probably tackle it in a separate PR to avoid scope creep?

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

PR: https://git.openjdk.org/jdk/pull/11044


More information about the hotspot-dev mailing list