[cfe-users] Status of '-pg'-style profiling in clang 3.2?

Sean Smith smsmith at gmail.com
Tue Jun 4 09:48:00 PDT 2013


I'm attempting to profile a C++ program by building like so:

clang++ -pg foo.cc -o foo

According to the LLVM 3.0 release notes, this is supported:

"The optimizer and code generator now supports gprof and gcov-style
coverage and profiling information, and includes a new llvm-cov tool (but
also works with gcov). Clang exposes coverage and profiling through
GCC-compatible command line options."

(see http://llvm.org/releases/3.0/docs/ReleaseNotes.html )

However, running foo does not produce gmon.out. Replacing clang++ with g++
(and changing nothing else) does produce gmon.out with expected contents.

$ clang++ --version
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-pc-linux-gnu
Thread model: posix

This clang++ was built from the release 3.2 source with default
configuration.

Any clues on what might be wrong?

Thanks,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20130604/c5e44ed4/attachment.html>


More information about the cfe-users mailing list