<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58174>58174</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [ORC/MCJIT] Perf Integration not working as intended
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          lucasreis1
      </td>
    </tr>
</table>

<pre>
    I've been trying to profile jitted code with Perf with no success. 

I've tried with LLVM 13.1, LLVM 14 and LLVM 15, all compiled with `LLVM_USE_PERF=1`

I've tried to simulate the following steps:

`perf record -k 1 -g lli --jit-kind=mcjit expensive_loop.ll`
`perf inject --jit -i perf.data -o perf.data.jitted`
`perf report -i perf.data.jitted`

lli is generating the .dump file and injecting them is creating the shared objects as expected, but when I use `report` the symbols are not resolved to their expected functions, all I can see are the addresses.

I'm honestly at a loss of what to do. I've tried [this fix ](https://discourse.llvm.org/t/how-to-correctly-use-perfjiteventlistener/50849/2), and still got nothing.

Any help would be appreciated
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1U9uOmzAQ_RryMgKBCZvkgYft7lZK1apVb68rgwfwrrGRxyTN33cMabfbqhIX23M7Z864cepSHxOxOyE0iBaCv2jbQ3Aweddpg_CkQ0AFrVMIZx0G-IS-W1fWAc1ti0QZJPl9kt-u32vC4DUHLp7v33__AEWZFYm4u262IK26rqt4LI3hKuPERa9RyU0e7Y_fvjw8fnr4_DYp7ws--28pRk16nI0MfDIgdM4Yd458KOBESXn7ZyhnmiIVj63zCtJnKCDtwRgNacqs02dtFZccW94A_pjQkj7ho3Fuyox5AXLNo-0TtmGNhVRDPMyUDBJS97LJ1n7-E-1xcv513D-uyzfi0wQ9WvQyLGIx1UzN4wSLYLGtK5arcYz-rccXbxqk5365JnoRSFrotbEYC9HMAc4DD8MRZsKowgqOF2v0ZWyc4TCPPAKBoZMzp7X_bNf-dzboZsswnKVfAh-hlRYIcYmO2aRSnICQsr91HWFwFimYC8gAEowjAsezN_CWaymXwSv9k-pNGJhrp3_w-j4R-yGEVXfxlh-lqXWzJ2T5TmPmfM-Hgd_BndPgUp4DHgaulzLvNOrACuAJbTCaJ4gbzr5Vvt8e-C8ScVhYcbspaObWcy-4HwN3-RWXW3uBAc0EZzcbxfcM5DRxIc1zqjZYFzc3VV7k-91-o-pSHcqD3AQdDNZM6OPnOy724e7d8StTWi_f0Qbso_jOLgKcnX-O0rKOmk1WcdrZm_o1-56v1NxkfMV4Extw_aV80-Mc8FYTzUiR5L7YbTdD3VXVriv31VYoxlXeYLeTW3VocC9lI7bdxsgGDUWgiRAWz7Ck4DWD3eha5EIUeV6JMi-KfdZJrA6ilOVuK_JcNMk2x1Fq81uPja8XSM3cExtj2-nFKIl0b3HpS8wv5zA4jphbSR41FZuler2g_wlFd5Pb">