RFR: 8139457: Array bases are aligned at HeapWord granularity [v52]
Axel Boldt-Christmas
aboldtch at openjdk.org
Wed Aug 23 09:17:13 UTC 2023
On Tue, 22 Aug 2023 11:55:36 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> This could now also subsume the filling of the klass-gap from initialize_header(), right?
When `initialize_header` is used to create an array header it does not fill the klass gap. But it is always done for Instance object headers as the way that C1 is currently structured we are in a context where we do not know wether the klass gap is going to be used for fields or not. So it must always be cleared.
We could move this clearing to `initialize_body`, but that would require a larger refactoring. I think the first step would be to fix the nomenclature and structure of the different headers. We would need something similar to `arrayOopDesc::header_size_in_bytes()` for `oopDesc`.
And if the goal is to avoid initialising padding bytes the C1 allocate_object and allocate_array paths need to be reworked to know where the fields start.
> I wonder if it makes sense to do this in a follow-up PR, to keep this PR focused? It's already quite long-running and re-testing and re-reviewing it all only makes it longer?
With regards to the ZGC changes, I spoke with @stefank and we agree that as long as they are correct it would be fine if they go in as is, and have us (the ZGC team) clean it up in a later patch.
For the C1 code I defer to someone else. In general looks like the C1 code has a lot of potential for cleanups regardless.
I'll make sure to review the current patch later today. I think I have some comments on some of the comments on changed methods and inconstancies in naming between declarations and definitions. But nothing that should have to trigger retesting.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/11044#issuecomment-1689446209
More information about the hotspot-dev
mailing list