<div dir="ltr">I'm trying to use PerfJITEventListener with llvm::orc::LLJITBuilder:<div><br><div>1. perf record -o /tmp/perf.data -- <my_binary_with_event_listener></div><div>2. perf inject -j -v -i /tmp/perf.data -o /tmp/perf.data.jit</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><i>jit marker found: ~.debug/jit/llvm-IR-jit-20200417-3c2242/jit-149849.dump</i></div></div><div><div><i>injecting: ~/.debug/jit/llvm-IR-jit-20200417-3c2242/jit-149849.dump</i></div></div><div><div><i>write ELF image ~/.debug/jit/llvm-IR-jit-20200417-3c2242/jitted-149849-1.so</i></div></div><div><div><i>write ELF image ~/.debug/jit/llvm-IR-jit-20200417-3c2242/jitted-149849-2.so</i></div></div><div><div><i>injected: ~/.debug/jit/llvm-IR-jit-20200417-3c2242/jit-149849.dump (0)</i></div></div></blockquote><div><div><br></div><div>Generated ELF files have correct .text sections.</div><div><br></div><div>However perf report can't find these generated so files:</div><div><br></div><div>+   69.50%    23.82%  my_binary  [JIT] tid 149849    [.] 0x00007f9c34d5106a<br>+   51.78%    45.69%  my_binary  [JIT] tid 149849    [.] 0x00007f9c34d51065<br>+   27.71%     6.09%  my_binary  [JIT] tid 149849     [.] 0x00007f9c34d51060<br></div><div><br></div><div>It seems that perf report is looking for a shared object in /tmp/perf-149849.map, but that file doesn't exist.</div><div><br></div><div>Looking at examples in the original LLVM change (<a href="https://reviews.llvm.org/D44892?">https://reviews.llvm.org/D44892?</a>), I don't see any mentions of perf.map file.</div></div><div><br></div><div>Do I miss something? Are there any examples of how to use perf listener?</div><div><br></div><div>Thanks,</div><div>Eugene</div></div>