Debugin Hotspot VM in Netbeans - Ubuntu Linux 14

Marcelino Rodriguez cancio marcelino.rodriguez-cancio at irisa.fr
Thu Feb 18 14:39:49 UTC 2016


Thank you so much Volker, that solved the problem!

I have to say I'm surprised how supportive you guys are! OpenJDK rocks!

Best
Marcelino

----- Mail original -----
> De: "Volker Simonis" <volker.simonis at gmail.com>
> À: "Marcelino Rodriguez cancio" <marcelino.rodriguez-cancio at irisa.fr>
> Cc: adoption-discuss at openjdk.java.net, "Benoit Baudry" <benoit.baudry at inria.fr>, "Benoit Combemale"
> <benoit.combemale at irisa.fr>
> Envoyé: Jeudi 18 Février 2016 12:25:05
> Objet: Re: Debugin Hotspot VM in Netbeans - Ubuntu Linux 14
> 
> Hi Marcelino,
> 
> if you are using a recent clone of jdk9 you have to replace
> --disable-zip-debug-info with --with-native-debug-symbols=external
> during configure (there's a warning line at the end of configure which
> warns you about --disable-zip-debug-info being ignored, but it can be
> easily overlooked).
> 
> Without --with-native-debug-symbols=external the debug info will be in
> libjvm.diz and gdb can not find the line number and symbol
> information. Unzipping libjvm.diz (in-place) will give you
> libjvm.debuginfo which will be automatically loaded by gdb if it is
> located in the same directory like libjvm.so.
> 
> Regards,
> Volker
> 
> 
> 
> On Wed, Feb 17, 2016 at 2:53 PM, Marcelino Rodriguez cancio
> <marcelino.rodriguez-cancio at irisa.fr> wrote:
> > Hello all,
> >
> > I'm trying to debug the with OpenJDK9 Hotspot in Linux Ubuntu 14 using
> > Netbeans.
> >
> > My problem is that the gdb debugger, which I launch from the IDE, don't
> > stop in certain breakpoints, specifically in :
> > /9dev/hotspot/src/share/vm/opto/loopPredicate.cpp/loopPredicate.cpp:909
> >
> > I'm able to launch the compiler and stop in:
> > /9dev/jdk/src/java.base/share/native/libjli/java.cjava.c:1138, for
> > example.
> >
> > I believe this happens because gdb does not attach to the VM thread, which
> > seems to me is a child thread, only the parent launched from the Java
> > executable (images/jdk/java).
> >
> > I'm total newby to gdb and I would like to debug from the IDE if possible.
> > Any hints, leads or advice on this?
> >
> >
> >
> >
> > My SETUP is as Follows:
> >
> > I can see that the code containing the breakpoint is executed looking at
> > the trace of the Hotspot (I'm using -XX:+TraceLoopPredicate ):
> > rc_predicate init <u range
> > lower bound check if: 475
> > rc_predicate (limit - stride) <u range
> > upper bound check if: 475
> > Loop Predication Performed: Loop: N467/N273 limit_check predicated counted
> > [int,int),+1 (-1 iters) has_sfpt rce
> > rc_predicate init <u range
> > lower bound check if: 200
> > rc_predicate (limit - stride) <u range
> > upper bound check if: 200
> > Loop Predication Performed: Loop: N198/N184 limit_check predicated counted
> > [int,int),+1 (-1 iters) has_sfpt rce
> > no main manifest attribute, in
> > /home/elmarce/PROJECTS/PHD/predicateloop/target/predicateloop-1.0-SNAPSHOT.jar
> >
> > I have described the way I compiled OpenJDK in here:
> > http://marcelinorc.com/2016/02/11/compiling-openjdk-9/
> >
> > And the way I created the Netbeans project in here:
> > http://marcelinorc.com/2016/02/17/using-netbeans-to-hack-openjdk9-in-ubuntu/
> >
> > I have configurated the compilation with the flags:
> > --with-debug-level=slowdebug --with-target-bits=64 --disable-zip-debug-info
> >
> > I'm using as build result:
> > build/linux-x86_64-normal-server-slowdebug/jdk/bin/java
> >
> > And as Run Command: "${OUTPUT_PATH}" -XX:+TraceLoopPredicate -jar
> > /path/to/file/predicateloop-1.0-SNAPSHOT.jar
> >
> >
> >
> > I have read the post by Simonis:
> > https://community.oracle.com/blogs/simonis/2008/01/24/hotspot-development-linux-netbeans-part-2#NB_Debug
> >
> > And then Watched the video:
> > https://www.youtube.com/watch?v=k7IX_diKCEo
> >
> >
> >
> > Thanks
> > Marcelino
> 


More information about the adoption-discuss mailing list