Debugging Graal-enabled OpenJDK

Tom Rodriguez tom.rodriguez at oracle.com
Mon Oct 3 17:09:49 UTC 2016


> On Oct 3, 2016, at 10:04 AM, Vitaly Davidovich <vitalyd at gmail.com> wrote:
> 
> 
> 
> On Monday, October 3, 2016, Tom Rodriguez <tom.rodriguez at oracle.com <mailto:tom.rodriguez at oracle.com>> wrote:
> 
> > On Oct 3, 2016, at 9:46 AM, Andrew Haley < <>aph at redhat.com <mailto:aph at redhat.com>> wrote:
> >
> > I'm trying to follow the instructions at
> > https://github.com/graalvm/graal-core/blob/master/docs/Debugging.md <https://github.com/graalvm/graal-core/blob/master/docs/Debugging.md>
> >
> > My problem is that none of the Graal classes seem to be loaded but
> > compilation is still happening.  I see:
> 
> I looks like it just hasn’t triggered a level 4 compile which is where graal runs.  Turn off tiered compilation or run something that makes the VM work harder.  Also -XX:+BootstrapJVMCI will forcibly exercise Graal before the VM starts up and warm up the compiles needed by Graal as well.
> Tom,
> 
> Any reason BootstrapJVMCI isn't enabled by default? Seems like the safer/common option is to have that bootstrap early so any issues will be discovered before the app is fully online.  Discovering problems at some later point in time seems problematic (as the default choice). 

Well there aren’t supposed to be problems.  :) The bootstrap is expensive and all it does is exercise the compiler to warm it up which will happen in the normal course of execution.  The first Graal compile usually happens pretty soon after startup for real programs anyway.  If you haven’t managed to trigger a level 4 compile yet then you don’t really need level 4.  I don’t see C2 compiles triggered for HelloWorld either.

tom

> 
> tom
> 
> >
> > mx -d vm -XX:+UseJVMCICompiler  -cp ~ -XX:+PrintCompilation Hello
> > Listening for transport dt_socket at address: 8000
> >   7142    1       3       java.lang.String::hashCode (55 bytes)
> >   7144    2       3       java.lang.String::charAt (29 bytes)
> >   7145    3       3       java.lang.String::length (6 bytes)
> >   7145    4       3       java.lang.String::indexOf (70 bytes)
> >   7145    5     n 0       java.lang.System::arraycopy (native)   (static)
> >   7145    8       3       java.lang.Object::<init> (1 bytes)
> >   7145    7       3       java.lang.Math::min (11 bytes)
> >   7145    6       1       java.lang.ref.Reference::get (5 bytes)
> >   7145    9       3       java.lang.String::equals (81 bytes)
> >   7145   10       1       java.lang.ThreadLocal::access$400 (5 bytes)
> >
> > This looks like the usual C1 compilation.  If I use -verbose:class
> > no Graal classes are listed.
> >
> > So what do I have to do in order to make the JVM use Graal, so that
> > I can debug it?
> >
> > Andrew.
> 
> 
> 
> -- 
> Sent from my phone



More information about the graal-dev mailing list