Stack allocation prototype for C2
Andrew Haley
aph at redhat.com
Thu Jul 2 08:15:42 UTC 2020
On 29/06/2020 22:05, Charlie Gracie wrote:
> Here is the prototype code for our work on adding stack allocation
> to the HotSpot C2 compiler. We are looking for any and all feedback
> as we hope to move from a prototype to something that could be
> contributed.
We certainly need a repo where it can go. It could either be adopted
by an existing project or it could have a project of its own. The
latter is perhaps a bad idea because it would be too isolated.
> A change of this size is difficult to review so we understand the
> process will be thorough and will take time to complete. Any
> suggestions on how to allow for collaboration with others, if they
> wanted to, would also be appreciated (i.e., a repo somewhere).
Here's my concern.
Java stacks are, in general, pretty small. This is good, and makes for
economical memory usage. This is particularly useful for Project Loom,
where there can be enormous numbers of "virtual" threads. These
threads, while they are not active, are stored in the heap.
As you might imagine, the idea of embedded objects (which, of course,
cannot be collected) in these virtual threads does not delight me at
all. Is this likely to be a real problem, do you think, or are all of
the stack-allocated objects so small that I shouldn't be concerned?
--
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-compiler-dev
mailing list