title: Explanation of Java -Xprof Output
body: <p>I am trying to interpret profiling output produced by specifying the <code>-Xprof</code> flag.</p>
  
  <p>For my application I get profiling output like this:</p>
  
  <pre><code> Flat profile of 8.34 secs (775 total ticks): main
    Interpreted + native   Method
   10.4%    66  +    12    java.lang.ClassLoader.defineClass1
    3.6%    27  +     0    java.nio.HeapCharBuffer.&lt;init&gt;
    2.5%     1  +    18    java.io.UnixFileSystem.getBooleanAttributes0
  ...
   74.4%   380  +   179    Total interpreted (including elided)
       Compiled + native   Method
    0.3%     0  +     2    java.util.jar.JarFile$1.hasMoreElements
    0.3%     0  +     2    org.reflections.vfs.ZipDir$1$1.computeNext
    0.1%     0  +     1    java.lang.Object.&lt;init&gt;
  ...
    1.7%     3  +    10    Total compiled
           Stub + native   Method
    7.5%     0  +    56    java.util.zip.ZipFile.getEntry
    4.7%     0  +    35    java.lang.Object.getClass
    3.2%     0  +    24    java.lang.System.arraycopy
  ...
   23.2%     0  +   174    Total stub
    Thread-local ticks:
    3.1%    24             Blocked (of total)
    0.7%     5             Class loader
  </code></pre>
  
  <p>For each thread. My question is what is the difference between <code>Interpreted</code>, <code>Compiled</code>, and <code>Stub</code> methods, what are <code>Thread-local ticks</code>, and what is the meaning of the <code>+ native</code> column? Is there any canonical documentation for the <code>-Xprof</code> profiler? Googling <code>Xprof</code> has yielded little.</p>