User Tools

Site Tools


java

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
java [2020/09/26 12:17] – created ealmrjava [2025/03/30 12:30] (current) ealmr
Line 1: Line 1:
-====== Compile jdk8u ======+====== Build ====== 
  
 <code> <code>
-hg clone http://hg.openjdk.java.net/jdk8u/jdk8u/ +  hg clone http://hg.openjdk.java.net/jdk8u/jdk8u/ 
-cd jdk8u +  cd jdk8u 
-sh ./get_source.sh +  sh ./get_source.sh 
-sh ./configure --with-debug-level=slowdebug --disable-zip-debug-info+  sh ./configure --with-debug-level=slowdebug --disable-zip-debug-info
 </code> </code>
 +
 +====== Options ======
 +
 +  * - -XX:+UnlockExperimentalVMOptions
 +  * - -Xprintflags
 +  * - -XX+PrintFlagsWithComments
 +  * - -XX:+PrintFlagsInitial
 +  * - -XX:+PrintFlagsFinal
 +  * - -XX:+CountBytecodes
 +  * - -XX:+PrintBytecodeHistogram
 +  * - -XX:+Printinterpreter
 +  * - -XX:+TraceBytecodes
 +  * - -XX:StopInterpreterAt=<num printed by -XX:+TraceBytecodes>
 +  *   - set `b breakpoint` at GDB
 +  * - -XX:CompileCommand="break <className:method>"
 +  * - -XX:CompileCommand="print <className:method>"
 +
 +====== Template Intepreter ======
 +
 +
 +This requires hsdis:
 +
 +<code>
 +  cd hotspot/src/share/tools/hsdis/
 +  wget http://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.xz
 +  tar xvf binutils-2.33.1.tar.xz
 +  make all64 BINUTILS=binutils-2.33.1
 +  cp build/linux-amd64/hsdis-amd64.so /same/path/to/libjvm.so
 +  ./java -XX:+PrintInterpreter Hello
 +</code>
 +
 +====== GDB ======
 +
 +  * - `call help()`
 +  * - `call pns($sp, $rbp, $pc)`
 +
 +====== Reference ======
 +
 +http://www.progdoc.de/papers/JavaOne2014/javaone2014_con3138.html 
 +
java.1601122661.txt.gz · Last modified: by ealmr

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki