Java 10 HotSpot Disassembly on macOS High Sierra

Printing Generated Assembly Code From The Hotspot JIT Compiler documented back in 2013 how to view Java Hotspot generated assembly code.

While still useful, the disassembler plugin referenced in the post is no longer available in binary form as the Kenai project has been decommissioned.

A number of references are available on how to build the plugin, however information on how to build on current macOS systems is hard to come by. Here is how to build the disassembler plugin on Java 10.

Prerequisites
  • macOS High Sierra 10.13
  • Xcode 9.3 (including Command-line Tools)
Instructions
Links
  • https://github.com/AdoptOpenJDK/jitwatch/wiki/Building-hsdis pointed out the requirement for binptils 2.26
  • https://www.chrisnewland.com/updated-instructions-for-building-hsdis-on-osx-417 was a good starting point
  • OpenJDK Supported platforms: https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms
  • OpenJDK Sources: http://jdk.java.net/java-se-ri/10
  • java command line arguments: https://docs.oracle.com/javase/10/tools/java.htm

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.