[LLVMdev] Using gprof with clang

Vishruth Ashok ashok2 at illinois.edu
Fri Apr 5 10:31:46 PDT 2013


Hi,

I was trying to profile some C-code using clang.
This was the actual line:
clang -flto -g -pg a.o b.o -o test
but the '-pg' flag was unused.

I found an archive from January 2011 that says that clang does not support
gprof profiling:
http://lists.freebsd.org/pipermail/freebsd-toolchain/2011-January/000083.html
The error mentioned in that is different, so I have a feeling the issue
mentioned there has been resolved since then.

I looked at the current clang documentation and it says that:
'-pg' Enables mcount instrumentation.

I was wondering if I could get some assistance with profiling code using
clang.

Thanks,
Vishruth

-- 
Vishruth Ashok
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130405/e4bcc3f5/attachment.html>


More information about the llvm-dev mailing list