Question on location of hsdis library for JDK7
Krystal Mok
rednaxelafx at gmail.com
Sat Jul 2 05:14:44 PDT 2011
Hi all,
I used to build the hsdis library and put it along side $LIBARCH/libjvm.so
and it worked fine.
But when I was trying it out today with JDK7 build 147 x64 on Ubuntu,
putting hsdis-amd64.so along side libjvm.so didn't work.
The log says:
Could not load hsdis-amd64.so; library not loadable; PrintAssembly is
disabled
Instead, setting LD_LIBRARY_PATH to the where hsdis-amd64.so is in did work
like before. e.g.
$ export
LD_LIBRARY_PATH=.:/home/sajia/jdk/7b147_x64_debug/fastdebug/jre/lib/amd64/server
I'm not sure from which version it started to behave like this, or which
platforms are affected.
On the same machine, JDK6u25 can load the same hsdis-amd64.so from along
side libjvm.so without problem.
Then I copied libjvm.so from JDK7b147 to my JDK6u25 installation and tried
again:
$ echo $LD_LIBRARY_PATH
$ java -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly | head -n5
Java HotSpot(TM) 64-Bit Server VM warning: PrintAssembly is enabled; turning
on DebugNonSafepoints to gain additional output
VM option '+UnlockDiagnosticVMOptions'
VM option '+PrintAssembly'
Loaded disassembler from hsdis-amd64.so
Decoding compiled method 0x00002aaaab118910:
$ java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17-fastdebug, mixed mode)
And it worked. And then doing the reverse, copied the libjvm.so to
JDK7b147's installation:
$ export JAVA_HOME=~/jdk/7b147_x64_debug/fastdebug
$ export PATH=$JAVA_HOME/bin:$PATH
$ echo $LD_LIBRARY_PATH
$ java -version
java version "1.7.0-fastdebug"
Java(TM) SE Runtime Environment (build 1.7.0-fastdebug-b147)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
$ ls $JAVA_HOME/jre/lib/amd64/server/
hsdis-amd64.so libjsig.so libjvm.so libjvm.so.orig Xusage.txt
$ java -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly | head -n5
Java HotSpot(TM) 64-Bit Server VM warning: PrintAssembly is enabled; turning
on DebugNonSafepoints to gain additional output
Could not load hsdis-amd64.so; library not loadable; PrintAssembly is
disabled
>From that I'd guess it's a JDK7-only behavior; doesn't seem to be a HotSpot
VM problem.
Does anybody have a clue on this?
Regards,
Kris Mok
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20110702/064d4f03/attachment.html
More information about the hotspot-dev
mailing list