How do I get a profiled libstdc++?

Scott A Crosby scrosby@cs.rice.edu
Tue Nov 21 04:24:00 GMT 2006


I've been trying to profile a program which has a substantual amount
of its runtime in libstdc++. But try as I might, I can't get a copy of
libstdc++ to compile with profiling, get my program to link against
it, and have it generate a gmon.out that has frequency counts for the
code in libstdc++. It only partially works, generating call counts for
my program and the template functions in stdc++ that my program
invokes.

I'm using gcc (GCC) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)
under x86 linux.

I'd like to use gprof instead of oprofile, because of how it
summarizes the call tree.

Any ideas for how I can get this to work? GCC bugzilla and google come
up empty.

Thanks,
Scott



More information about the Libstdc++ mailing list