User Tools

Site Tools


java

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
java [2020/09/26 12:18] – removed ealmrjava [2025/03/30 12:30] (current) ealmr
Line 1: Line 1:
 +====== Build ======
 +
 +
 +<code>
 +  hg clone http://hg.openjdk.java.net/jdk8u/jdk8u/
 +  cd jdk8u
 +  sh ./get_source.sh
 +  sh ./configure --with-debug-level=slowdebug --disable-zip-debug-info
 +</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.1601122734.txt.gz · Last modified: by ealmr

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki