Help Needed
Kanik Chakravarty
kanikchakravarty at gmail.com
Mon Dec 13 10:23:09 PST 2010
Hi
I am a university student working for a JVM based based cache simulator. I
have downloaded and created a debug build for OpenJDK in Ubuntu 10.10. I
have setup a hotspot project in NetBeans and used two different build
configurations for C1 and C2 compilers. My aim is to modify the C and C++
files in the project and insert print statements (to print to a file) so as
to get a trace of the methods invoked as a Java program runs on the HotSpot
JVM. I am concerned with the methods called when a new array is initialized
in Java.
My questions are very basic. Just Yes/No answers will help me immensely. Any
detailed answer will be highly appreciated.
Questions:
1. Is it possible to print to a text file the trace of HotSpot C++
methods as a Java program is run? If not, what is the alternate method of
obtaining the trace?
2. I want my Java programs (one which creates simple arrays) to run on
the HotSpot I modified (inserted print statements). For this,
a. I am building the hotspot project in Netbeans.
b. The output of this build is placed in a folder named
"hotspot_debug".
c. After this, I change the name of the folder "hotspot_debug" to
"hotspot" and place it in the Original OpenJDK folder downloaded using
Mercurial.
d. I again build the OpenJDK project
e. Place
JAVA_HOME=/home/myname/DevSoftwares/OpenJDK/jdk7/build/openjdk_full_debug/j2sdk-image
in
Is this the correct approach?
Can the process be simplified by changing some make files or
configurations?
3. The folder structure in my default JDK installation
("/usr/lib/jvm/java-6-openjdk") and that in
"OpenJDK/jdk7/build/openjdk_full_debug/j2sdk-image" are the same.
But There are many folders present in the debug build of OpenJDK other than
j2sdk-image. Is this because the build process for OpenJDK from the
sources for each project occurs in two steps - first building the individual
projects and finally building the j2sdk-image?
4. I am using Netbeans IDE for both HotSpot and my Java programs. Is it
necessary to change the default JDK home in netbeans-6.9.1/etc/netbeans.conf
to
netbeans_jdkhome="/home/myname/DevSoftwares/OpenJDK/jdk7/build/openjdk_full_debug/j2sdk-image"
instead of netbeans_jdkhome="/usr/lib/jvm/java-6-openjdk" (my defalult JDK)
so that Java programs use the JDK I just built?
--
Thanks and Regards,
Kanik Chakravarty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20101213/961362be/attachment.html
More information about the hotspot-dev
mailing list