[LLVMdev] Profiling LLVM JIT code
andrew.kaylor at intel.com
Mon Mar 4 11:54:37 PST 2013
There is support for oprofile and Intel(r) VTune(tm) Performance Analyzer, but either one needs to be explicitly turned on during the build process. If you use MCJIT (as opposed to the older JIT) then oprofile support isn't in place yet.
Both of these work by providing a JITEventListener that receives notification when new code is emitted and hooks it up to the profiling tool via some tool-specific notification API. I'm not familiar with pprof, but it probably wouldn't be very difficult to write a new event listener to add support for pprof.
You can find the oprofile code in 'llvm/lib/ExecutionEngine/OProfileJIT' to use as an example.
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Priyendra Deshwal
Sent: Sunday, March 03, 2013 3:11 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Profiling LLVM JIT code
I am currently working on a project that uses JIT compilation to compile incoming user requests to native code. Are there some best practises related to profiling the generated code?
My project uses gperftools pprof for profiling etc. Is there a way to hook the two up? Are there any other profiling method that works? This page describes how to debug JIT code with GDB. I wonder if something similar could be done for gperftools/pprof?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev