Frank Tetzel via llvm-dev
2018-Jul-15 11:00 UTC
[llvm-dev] profiling JIT compiled code with perf
Hello, is there any support in LLVM for the jitdump format [1] of perf? It enables perf report to also "zoom in" and annotate the JIT compiled code on assembly level with runtime percentage. It helps a lot to understand which parts of the generated code is the bottleneck. I recently did a proof-of-concept for the JIT assembler asmjit [2]. It just dumps the generated code in the right format and mmaps the file to let perf record know about it. perf report picks it up automatically. So, is there any profiling support for JIT compiled code? Best regards, Frank [1] https://raw.githubusercontent.com/torvalds/linux/master/tools/perf/Documentation/jitdump-specification.txt [2] https://github.com/asmjit/asmjit/pull/197
Frank Tetzel via llvm-dev
2018-Jul-18 21:12 UTC
[llvm-dev] profiling JIT compiled code with perf
> Hello, > > is there any support in LLVM for the jitdump format [1] of perf? > > It enables perf report to also "zoom in" and annotate the JIT compiled > code on assembly level with runtime percentage. It helps a lot to > understand which parts of the generated code is the bottleneck. > > I recently did a proof-of-concept for the JIT assembler asmjit [2]. It > just dumps the generated code in the right format and mmaps the file > to let perf record know about it. perf report picks it up > automatically. > > So, is there any profiling support for JIT compiled code?I guess that's a no. Is there a simple way to get a pointer to the assemble code and the exact size in bytes? Or should I just use the function pointer? Where do I get the size? Then I could at least dump the native code. Profiling on assembly level would already help a lot. Regards, Frank
Valentin Churavy via llvm-dev
2018-Jul-19 04:32 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. -Valentin On Wed, 18 Jul 2018 at 17:13 Frank Tetzel via llvm-dev < llvm-dev at lists.llvm.org> wrote:> > Hello, > > > > is there any support in LLVM for the jitdump format [1] of perf? > > > > It enables perf report to also "zoom in" and annotate the JIT compiled > > code on assembly level with runtime percentage. It helps a lot to > > understand which parts of the generated code is the bottleneck. > > > > I recently did a proof-of-concept for the JIT assembler asmjit [2]. It > > just dumps the generated code in the right format and mmaps the file > > to let perf record know about it. perf report picks it up > > automatically. > > > > So, is there any profiling support for JIT compiled code? > > > I guess that's a no. > > Is there a simple way to get a pointer to the assemble code and the > exact size in bytes? Or should I just use the function pointer? Where > do I get the size? > > Then I could at least dump the native code. Profiling on assembly level > would already help a lot. > > Regards, > Frank > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180718/1ff8f391/attachment.html>
Apparently Analagous Threads
- profiling JIT compiled code with perf
- profiling JIT compiled code with perf
- ORC JIT Weekly #7 -- JITEventListener support and Swift Immediate Mode Migration
- Interest in integrating a linux perf JITEventListener?
- Interest in integrating a linux perf JITEventListener?