user1583731
user1583731

Reputation: 21

How to view the source code in Kcachegrind

I have been able to analyze the callgrind details for my program from the terminal...

However, when I want to view the results in the graphical Tools using "KcacheGrind"... I cannot access the mysource code which should be available by default under the Source_Code tab.

Can anyone point out what needs to be done?

Upvotes: 2

Views: 5263

Answers (2)

Rabie Sulman
Rabie Sulman

Reputation: 81

For me, profiling php and using kcachegrind (Version 0.7kde), I go to [settings] -> [Configuration] -> [Annotations] then add a folder which has an exact copy of the code I ran the test on (or the code's actual location if you have access to from the machine you are running kcachegrind).

Upvotes: 8

Nikita Krupenko
Nikita Krupenko

Reputation: 1175

You need build with debug information enabled and to have sources available at the location, they was during build. AFAIK, this may be configured, but by default sources should be at the same location, so if you build on different machine, you should place them as on build machine.

Upvotes: 2

Related Questions