[LLVMdev] Problems with instrumentation

Wojciech Matyjewicz wmatyjewicz at fastmail.fm
Thu Feb 7 15:04:35 PST 2008


Hi,

> llvm-gcc -g -emit-llvm test.c -c -o test.bc
> opt -insert-edge-profiling test.bc -o output.bc
> llc output.bc -o output.s
> gcc output.s -o test.out
> 
> However,  it can't  find symbol llvm_start_edge_profiling.

-insert-edge-profiling inserts call to the llvm_start_edge_profiling
function which is a part of a profiling runtime library. This library
must be linked into your executable.

The runtime library isn't built automatically. To build it, please, run
make in the $LLVMOBJDIR/runtime directory. If it complains about
LLVMGCCDIR not set, it means you have to reconfigure LLVM with
--enable-llvmgccdir option.

You may also find some useful information in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-January/012315.html

-Wojtek




More information about the llvm-dev mailing list