Reserving an extra slot on the stack
Andrew Dinn
adinn at redhat.com
Thu Jan 25 15:19:38 UTC 2018
On 25/01/18 14:59, David Lloyd wrote:
> For an experiment I'm working on, I'd like to modify the JVM to
> reserve one reference-sized slot (which eventually should be visible
> to GC) on every stack frame at a fixed well-known offset (such that I
> can reach it via Unsafe from Java-space). But it appears that the
> stack layout code is pretty deep in per-CPU areas. Is there a generic
> mechanism that I've missed? Like some way to make the compiler act as
> if there were one extra local variable or something like that?
Not really. Stack layouts are, of necessity, quite tightly coupled to
the underlying cpu and os.
Can you explain what you are trying to achieve so we might perhaps be
able better to advise on how to get there? There are so many gotchas in
the area of GC operation and stack frame management that questions like
"can I modify mechanism X" (where X relates to either or both topics)
are very hard to answer. It is much easier to scope and determine a
complete and correct response to questions like "can I achieve goal Y".
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the hotspot-dev
mailing list