Wednesday, August 7, 2013

hotspot.log from the HotSpot's Fastdebug Build

I was asked to use a fastbebug VM build to run my benchmark.  I have noticed that a new file was generated in our WebLogic domain folder:
  • hotspot.log[1]
To track which methods are getting inlined, you can use DEBUG VM with the following option:
  • -XX:PrintInlining
Note that there are some interesting options available only in DEBUG build[4].


What Is a Fastdebug Build?


There are only scarce information for fastdebug VM build on the internet.  Here are some description of it (but, it may be obsolete)[2]:

  • Hotspot, fastdebug builds, plug&play shared libraries (removal of java_g)
    These may seem unrelated, but when the Hotspot team started building "fastdebug" VM libraries (using -g -O and including assertions), that could just be plugged into any JDK image, that was a game changer. It became possible to plug&play native components when building this way, instead of the java_g builds where all the components had to be built the same way, an all or nothing run environment that was horribly slow and limiting. So we tried to create a single build flow, with just variations on the builds (I sometimes called them "build flavors" of product, debug, and fastdebug). Of course, at the same time, the machines got faster, and perhaps now using a complete debug build of a jdk make more sense? In any case, that fastdebug event influenced matters. We do want different build flavors, but we don't want separate make logic for them.


For a fastdebug build, I've downloaded the following zip file:
  • linux_x64_2.6-fastdebug.zip

hotspot.log


The contents of hotspot.log look like below:

<?xml version='1.0' encoding='UTF-8'?>
<hotspot_log version='160 1' process='7063' time_ms='1375898373959'>
<vm_version>
  <name>Java HotSpot(TM) 64-Bit Server VM</name>
  <release>25.0-b43-fastdebug</release>
  <info>
   Java HotSpot(TM) 64-Bit Server VM (25.0-b43-fastdebug) for linux-amd64 JRE ...
  </info>
</vm_version>
<vm_arguments>
  <args>
   ...
  </args>
  <command>weblogic.Server</command>
  <launcher>SUN_STANDARD</launcher>
  <properties>
   java.vm.specification.name=Java Virtual Machine Specification
   ...
  </properties>
</vm_arguments>

Obviously, there are tons of other information in the file that can help you to identify any VM issues.

References

No comments: