Getting trace output from LLVM

Hi

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.

With regards
Yan Lin Aung

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.
//