[llvm-dev] profiling JIT compiled code with perf

Andres Freund via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 31 14:28:50 PDT 2018


Hi,

On 2018-07-31 12:22:10 +0200, Frank Tetzel wrote:
> > > > Have you seen https://reviews.llvm.org/D44892? we are using it in
> > > > Julia to use perf on jitted code.  
> > > 
> > > No, I did not see this patch before. Thanks a lot for the pointer.
> > > 
> > > It seems to be doing exactly what I want. Let's see if I get it
> > > working.  
> > 
> > FWIW, I just merged this.  Did you have any luck getting it to work?
> 
> I have trouble getting it to work. I tried the example in the commit
> message, but perf report doesn't like to cooperate, or something else.

Yea, as mentioned in the commit message, that doesn't work out of the
box unless you merge the additional patch mentioned therein. The reason
is that mcjit (in contrast to orc), doesn't call the handlers at the
right time.

If you have an orc based application, and you register the handler, then
it'll work OOTB.

Greetings,

Andres Freund


More information about the llvm-dev mailing list