jitwatch查看JIT后的汇编码

1.下载Apache Maven 3.5.3

      http://maven.apache.org/download.cgi  

      apache-maven-3.5.3-bin.zip

      解压为C:\maven3

      在系统环境变量加入PATH后加入maven3的bin目录C:\maven3\bin

     

C:\Users\Administrator>mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-25T03:49:05+08:00)
Maven home: C:\maven3\bin\..
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_161\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

 

 

2.下载hsdis

  https://download.csdn.net/download/y1250056491/10102978

  复制文件windows下的HotSpot虚拟机JIT编译代码的反汇编插件,有32位和64位两个版本,放在类似\jre1.8.0_141\bin\server和\jdk1.8.0_1414\jre\bin\server目录下即可

   或者

  https://files.cnblogs.com/files/zengkefu/hsdis.rar

 

3.下载jitwatch

  https://github.com/AdoptOpenJDK/jitwatch

  下载解压到c:\jitwatch

 

4.执行java程序

  C:\java>java -server -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading  -XX:+PrintAssembly -XX:+LogCompilation -XX:LogFile=java.log  XX

 

5.起动jitwatch

  C:\jitwatch>mvn clean compile exec:java

 

posted @ 2018-06-10 21:35  zengkefu  阅读(671)  评论(0编辑  收藏  举报