Andres Freund via llvm-dev
2018-Jul-24 00:58 UTC
[llvm-dev] profiling JIT compiled code with perf
Hi, On 2018-07-19 14:57:42 +0200, Frank Tetzel via llvm-dev 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? Greetings, Andres Freund
Frank Tetzel via llvm-dev
2018-Jul-25 08:35 UTC
[llvm-dev] profiling JIT compiled code with perf
Hello,> > > 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?thanks for working on perf profiling support for the jit engines. Sadly, I still could not find the time to try it out, not even the simple example from the commit message. Also, I'm quite new to llvm and only have some toy examples at the moment which use orcjit with the SimpleCompiler class. I'm not sure where to add the perf event listener in all that. Best regards, Frank
Frank Tetzel via llvm-dev
2018-Jul-31 10:22 UTC
[llvm-dev] profiling JIT compiled code with perf
> > > 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. Do I have to activate something else than LLVM_USE_PERF in the compilation of llvm? Or do some other configuration? I had the impression that it's on by default in lli for now. Any special switch I have to use? What am I missing? Best regards, Frank
Andres Freund via llvm-dev
2018-Jul-31 21:28 UTC
[llvm-dev] profiling JIT compiled code with perf
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