views:

115

answers:

2

I'm trying to profile a shared library on GNU/Linux which does real-time audio processing, so performance is important. I run another program which hooks it up to the audio input and output of my system, and profile that with callgrind.

Looking at the results in KCacheGrind, I get great information about what functions are taking up most of my time. However, it won't let me look at the line by line information, and instead says I need to compile it with debugging symbols and run the profiling again.

The program which I am profiling is not compiled with debug symbols, but the library is. And I know this, because interestingly, source code annotations for cachegrind work fine.

When I run callgrind, it says the default is to dump source line information, but it just isn't doing that. Is there some way I could force it to, or figure out what's stopping it?

+2  A: 

See the valgrind FAQ, specifically 4.2 and 4.3

http://valgrind.org/docs/manual/faq.html#faq.unhelpful
http://valgrind.org/docs/manual/faq.html#faq.aliases

Sam Miller
A: 

Are you using --dump-instr=yes --trace-jump=yes to get the instruction level information?

Douglas Leeder
I was not using those options, but running it again with those options, I still cannot get it to show source lines.
Jeremybub