reference:
- https://github.com/AdoptOpenJDK/jitwatch/wiki/Building-hsdis
- https://gist.github.com/tinkerware/5235deb4bacc8ea3d7bc9c3d3972e453
- https://www.chrisnewland.com/updated-instructions-for-building-hsdis-on-osx-417
jdk1.8
cd jdk8u/hotspot/src/share/tools/hsdis/
make BINUTILS=binutils-2.31 ARCH=amd64
jdk11
cd jdk11ubuild/src/utils/hsdis
make BINUTILS=binutils-2.31 ARCH=amd64
编译运行
/Users/yakir/local/jdk-15.zero/Contents/Home/bin/javac -g Hello.java
/Users/yakir/local/jdk-15.zero/Contents/Home/bin/java -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+LogCompilation -XX:+PrintAssembly -XX:LogFile=/Users/yakir/Desktop/hello.log -XX:-BackgroundCompilation Hello