[LLVMdev] Profiling LLVM JIT code

Kaylor, Andrew andrew.kaylor at intel.com
Mon Mar 4 11:54:37 PST 2013


Hi Priyendra,

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.

-Andy

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

Hey guys,

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?

Regards,
-- Priyendra

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130304/a5ec2d18/attachment.html>


More information about the llvm-dev mailing list