JITWatch tool - why no nested parse tags in buildIR phase?

Chris Newland cnewland at chrisnewland.com
Fri Jun 27 21:07:36 UTC 2014

Hi, hope this is the correct place to discuss the hotspot.log output from
-XX:+LogCompilation ?

I've built a tool called JITWatch
(https://github.com/AdoptOpenJDK/jitwatch/wiki) for visualising the
HotSpot log file and experimenting with JIT'd code and I'm having problems
interpreting some of the output when -XX:+TieredCompilation is enabled.

Given code with a chain of method calls and a loop to call the first
method enough times to invoke the JIT compiler:

public class SandboxTest
    public int a(int x) { return 1 + b(x); }

    public int b(int x) { return 1 + c(x); }

    public int c(int x) { return 1 + x; }

    public static void main(String[] args)
        SandboxTest test = new SandboxTest();

        int sum = 0;

        for (int i = 0 ; i < 1_000_000; i++)
            sum = test.a(sum);

        System.out.println("Sum:" + sum);

I'm seeing very different output depending on whether tiered compilation
is enabled.

Without tiered compilation (Java 7 or Java 8 with -XX:-TieredCompilation)
I get the log file like:


with a <phase name="parse"> where each method call is inside a nested
<parse></parse> section so I can clearly identify chained method calls.

With tiered compilation enabled I get a log file like:


with only <phase name="buildIR"> which contains only a single parse tag
and I don't think I can differentiate between chained calls and sequential
calls in the same method.

This means that under tiered compilation, I can no longer produce compile
and inlining visualisations like this one:

Can anyone shed any light on how tiered compilation logs work and if there
is any way to pull out the same information as I could from Java 7 /
-XX:-TieredCompilation logs?

Many thanks,


More information about the hotspot-compiler-dev mailing list