escapa analysis, packed objects

Lukas Stadler lukas.stadler at jku.at
Fri Jul 26 11:24:53 PDT 2013


Hi Miguel,

unfortunately there's no documentation on Graal's partial escape analysis yet.
A short intro is available here: https://wiki.openjdk.java.net/display/Graal/Graal+Partial+Escape+Analysis
I'm currently working on a publication on this topic, I'd be happy to send you a version of it as soon as it's complete enough to make sense :-)
I also could give you an introduction over skype.

Concerning the "structs" proposals:
The IBM proposal seems to be mostly about how to interact with the C world, like a convenient wrapper around sun.misc.Unsafe.
I think that John Rose's proposal is more interesting, especially since the locking mechanism allows partial escape analysis to work much more efficiently.
(We actually already do a similar trick for boxing operations, so we could take advantage of this mechanism pretty quickly)

Much of this can be handled by the compiler, but of course it's only part of the picture. Allowing structs as return values means that this needs to be handled correctly by the interpreter, by deoptimization, by stack walking, in the debug interface, in jni code, etc.
I think it's too big a task (and too many VM changes) for us to do, but once this proposal gets picked up by the hotspot team, we can quickly provide efficient support for it.

- Lukas

On Jul 25, 2013, at 13:32 , Garcia Gutierrez Miguel Alfredo <miguelalfredo.garcia at epfl.ch> wrote:

> 
> Hi,
> 
> Escape analysis in Graal looks interesting. Are there any publications describing it? What I've heard about is:
> 
>  (1) Jong-Deok Shoi et al. https://wikis.oracle.com/display/HotSpotInternals/EscapeAnalysis
> 
>  (2) EA in the client compiler, http://ssw.jku.at/General/Staff/TK/Research/Publications/
> 
> 
> 
> Another question, this time looking into the future. Approaches have been put forward to support "structs in the JVM", things like:
> 
>  packed objects, http://www.slideshare.net/mmitran/ibm-java-packed-objects-mmit-20121120
> 
>  http://openjdk.java.net/jeps/169
> 
> What about Graal? For example, the use case "method returns a struct", would HotSpot stand in the way, or can LIR be tweaked to realize that? I know it's a slippery topic, but comments are welcome! :)
> 
> 
> Miguel
> 
> --
> Miguel Garcia
> Swiss Federal Institute of Technology
> EPFL - IC - LAMP1 - INR 328 - Station 14
> CH-1015 Lausanne - Switzerland
> http://lamp.epfl.ch/~magarcia/



More information about the graal-dev mailing list