[LLVMdev] Getting trace output from LLVM

Anton Korobeynikov anton at korobeynikov.info
Sun Feb 5 23:55:03 PST 2012


Hello

> I would like to get the execution trace output from LLVM.
> I noticed LLVM has "llvm-3.0.src/lib/Analysis/Trace.cpp" and
> "llvm-3.0.src/include/llvm/Analysis/Trace.h".
> Any idea on the functionality of Trace.cpp and how to invoke the dump()
> method in command line so that the execution traces can be observed. Thanks.
Have you looked inside? In particular the comment is pretty clear on
what's going inside and why this is not what you're looking for:

// This class represents a single trace of LLVM basic blocks.  A trace is a
// single entry, multiple exit, region of code that is often hot.  Trace-based
// optimizations treat traces almost like they are a large, strange, basic
// block: because the trace path is assumed to be hot, optimizations for the
// fall-through path are made at the expense of the non-fall-through paths.
//

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list