title: Understanding perf.map
body: <p>I'm aware of the great <a href="https://github.com/jvm-profiling-tools/async-profiler" rel="nofollow noreferrer">async_profiler</a> tool and I use it for profiling my production projects. Here I want to understand about <code>perf</code> and how to understand its output.</p>
  
  <p>I'm playing around with perf to sample stack traces. I run the JVM with options <code>-XX:+UnlockDiagnosticVMOptions -XX:+PreserveFramePointer -XX:+ShowHiddenFrames</code> to avoid stack trace messing.</p>
  
  <p>I ran it with command <code>sudo perf record -e cycles -g -p &lt;my_pid&gt;</code> in order to sample both user an kernel stack traces and compare the resulting percentage. Here is what I got:</p>
  
  <p><a href="https://i.stack.imgur.com/Y2k4W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y2k4W.png" alt="enter image description here"></a></p>
  
  <p>The <code>start_thread</code> symbol seems clear to me. They came from the <code>libjvm.so</code> and I can make the assumtion that I ran my 3 Worker Thread to do some job and this is exactly what I see here. The hexidecimal numbers seem to be a runtime compiled java-code instructions addresses. </p>
  
  <p><strong><em>QUESTION:</em></strong> But where did the <code>perf-27405.map</code> come from and why it appeared on top.</p>