aarch64: Concurrent class unloading, nmethod barriers, ZGC

Andrew Haley aph at redhat.com
Mon Jan 13 14:59:59 UTC 2020


On 1/10/20 4:56 PM, Stuart Monteith wrote:

>    Something like "adr(rscratch1, InternalAddress(nmethod field))" has
> been suggested before. My problem has been finding what the address of
> the nmethod fields would be without knowing where the instruction is
> relative to them before the nmethod has been allocated. Relocations
> can be performed between the sections  - constants, instructions and
> stubs - with section_word_Relocation instead of
> internal_word_Relocation. However, there doesn't appear to be a
> concept for the CodeBlob header during code emissions.

OK, I see..

> The nmethod structure is at 0x0000ffff68e0b010. Between that address
> and the main code is the relocation section, which we don't know the
> size of during instruction emission into the CodeBuffer.
> It appears that to relocate references to the nmethod structure from
> the code section before the nmethod is constructed would require its
> own relocation of sorts. I'm looking at adding a HEADER CodeSection
> that would allow relocation of entries into the nmethod/CodeBlob
> header.

We don't need another section. I think there are only two problems
with using the constant section. There is a large (and probably
pointless) alignment gap so that even a single-word constant takes up
a lot of space. Also, native methods don't have constant sections,
but that should be easy to fix.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-gc-dev mailing list