Re: obtaining hsdis for linux

  • From: Dennis Byrne <dennisbyrne@apache.org>
  • To: dev@base-hsdis.kenai.com
  • Subject: Re: obtaining hsdis for linux
  • Date: Mon, 16 Nov 2009 16:28:33 -0600

Thanks for your response John.  I've managed to build hsdis but I am
having trouble using it.  Can you please tell me who in Sun (or which
mailing list) can answer just a few questions?  I know you are busy
but please understand that it is very difficult to get any of this
working when you are on the outside (I appreciate your previous
response very much).  I am currently stuck at line 83 of the README
file [1].  I am trying to test my install of the plug in like this ...

dbyrne@wud-nbyrne01:~/print_assembly/java$ echo $LD_LIBRARY_PATH
/home/dbyrne/print_assembly/hotspot-fb4c00faa9da/src/share/tools/hsdis/build/linux-i586
dbyrne@wud-nbyrne01:~/print_assembly/java$
/usr/lib/jvm/java-6-openjdk/jre/bin/java
-XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
-XX:PrintAssemblyOptions=hsdis-print-bytes -Xbatch
CompileCommand=print,*String.hashCode HelloWorld

This produces about two thousand lines of assembly and the following
stack trace.

Exception in thread "main" java.lang.NoClassDefFoundError:
CompileCommand=print,*String/hashCode
Caused by: java.lang.ClassNotFoundException:
CompileCommand=print,*String.hashCode
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
Could not find the main class: CompileCommand=print,*String.hashCode.
Program will exit.

If I partially ignore the README, and place "-XX:" in front of the
CompileCommand, like this:

dbyrne@wud-nbyrne01:~/print_assembly/java$
/usr/lib/jvm/java-6-openjdk/jre/bin/java
-XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
-XX:PrintAssemblyOptions=hsdis-print-bytes -Xbatch
-XX:CompileCommand=print,*String.hashCode HelloWorld

... it does not error, and it does print assembly.  However, it prints
1998 lines of assembly.  I am under the impression that this would
only print the assembly for String.hashCode .

[1] 
http://hg.openjdk.java.net/jdk7/hotspot/hotspot/file/fb4c00faa9da/src/share/tools/hsdis/README

Dennis Byrne

On Wed, Nov 11, 2009 at 6:00 PM, John Rose <John.Rose@sun.com> wrote:
> Hi Dennis.  This project is a second independent implementation of the
> plugin.  There is no source code overlap of base-hsdis with the version of
> the plugin found in the OpenJDK sources.  So this is the wrong list to be
> asking about OpenJDK build problems.
>
> That said, your build is failing on this pathname:
>  /java/re/j2se/1.6.0/latest/binaries/linux-i586/
>
> That's a Sun-internal path wired into the makefiles; it needs to be somehow
> overridden by suitable settings on the make command line.  The various
> OpenJDK build instructions I've seen cover these settings, though not for
> the specific purpose of building the hsdis plugin.  They should apply to
> your case, too.
>
> As far as I know, you might be the first person to be building the OpenJDK
> hsdis outside of Sun.  If so, welcome to the bleeding edge!
>
> HTH
> -- John
>
> On Nov 11, 2009, at 3:27 PM, Dennis Byrne wrote:
>
>> I am trying to build the plugin for Linux and I was wondering if there
>> are any releases (other than Solaris and BSD) planned.  Also, I am
>> having trouble building
>>
>http://hg.openjdk.java.net/jdk7/hotspot/hotspot/file/tip/src/share/tools/hsdis/
>> from source.  Any help is much appreciated.
>>
>>
>>
>> dbyrne@wud-nbyrne01:~/print_assembly/hotspot-2f1ec89b9995/make$ java
>> -version
>> java version "1.6.0_0"
>> OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-1ubuntu3)
>> OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
>>
>> dbyrne@wud-nbyrne01:~/print_assembly/hotspot-2f1ec89b9995/make$ make
>> BINTUILS=/home/dbyrne/print_assembly/binutils-2.19.1
>> cd: 1: can't cd to /java/re/j2se/1.6.0/latest/binaries/linux-i586
>> cd /home/dbyrne/print_assembly/hotspot-2f1ec89b9995/make; \
>>      make VM_TARGET=product generic_build2
>> cd: 1: can't cd to /java/re/j2se/1.6.0/latest/binaries/linux-i586
>> make[1]: Entering directory
>> `/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/make'
>> mkdir -p /home/dbyrne/print_assembly/hotspot-2f1ec89b9995/build/linux
>> cd /home/dbyrne/print_assembly/hotspot-2f1ec89b9995/build/linux; \
>>          make -f
>> /home/dbyrne/print_assembly/hotspot-2f1ec89b9995/make/linux/Makefile
>> \
>>
>> JAVA_HOME=/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/make
>> OUTPUTDIR=/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/build/linux
>> GAMMADIR=/home/dbyrne/print_assembly/hotspot-2f1ec89b9995
>> MAKE_VERBOSE=y HOTSPOT_RELEASE_VERSION=17.0-b05
>> JRE_RELEASE_VERSION="1.7.0" HOTSPOT_BUILD_VERSION=internal product
>> cd: 1: can't cd to /java/re/j2se/1.6.0/latest/binaries/linux-i586
>> make[2]: Entering directory
>> `/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/build/linux'
>> make -f
>> /home/dbyrne/print_assembly/hotspot-2f1ec89b9995/make/linux/Makefile
>> checks
>> cd: 1: can't cd to /java/re/j2se/1.6.0/latest/binaries/linux-i586
>> make[3]: Entering directory
>> `/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/build/linux'
>> /java/re/j2se/1.6.0/latest/binaries/linux-i586/bin/javap
>> javax.xml.transform.TransformerFactory > /dev/null 2>&1; \
>>      if [ $? -ne 0 ]; then \
>>         /java/re/j2se/1.6.0/latest/binaries/linux-i586/bin/java -version;
>> \
>>        echo "*** An XSLT processor (J2SE 1.4.x or newer) is required" \
>>        "to bootstrap this build" 1>&2; \
>>        exit 1; \
>>      fi
>> /bin/sh: /java/re/j2se/1.6.0/latest/binaries/linux-i586/bin/java: not
>> found
>> *** An XSLT processor (J2SE 1.4.x or newer) is required to bootstrap this
>> build
>> make[3]: *** [check_j2se_version] Error 1
>> make[3]: Leaving directory
>> `/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/build/linux'
>> make[2]: *** [linux_i486_compiler2/debug] Error 2
>> make[2]: Leaving directory
>> `/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/build/linux'
>> make[1]: *** [generic_build2] Error 2
>> make[1]: Leaving directory
>> `/home/dbyrne/print_assembly/hotspot-2f1ec89b9995/make'
>> make: *** [product] Error 2
>>
>> --
>> Dennis Byrne
>
>



-- 
Dennis Byrne


obtaining hsdis for linux

Dennis Byrne 11/11/2009

Re: obtaining hsdis for linux

John Rose 11/12/2009

Re: obtaining hsdis for linux

Dennis Byrne 11/16/2009

Re: obtaining hsdis for linux

John Rose 11/16/2009

Re: obtaining hsdis for linux

Dennis Byrne 11/17/2009

Re: obtaining hsdis for linux

John Rose 11/17/2009

Re: obtaining hsdis for linux

Dennis Byrne 11/17/2009
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close