Chapter 5. Questions and Answers

5.1. What is KCachegrind for? I have no idea.
5.2. What is the difference between Incl. and Self?
5.3. If I double-click on a function down in the Call Graph view, it shows for function main() the same cost as the selected function. Isn't this supposed to be constant at 100%?

5.1.

What is KCachegrind for? I have no idea.

KCachegrind is a helpful at a late stage in software development, called profiling. If you don't develop applications, you don't need KCachegrind.

5.2.

What is the difference between Incl. and Self?

These are cost attributes for functions regarding some event type. As functions can call each other, it makes sense to distinguish the cost of the function itself (Self Cost) and the cost including all called functions (Inclusive Cost). Self is sometimes also referred to as Exclusive costs.

So, for example, for main(), you will always have an inclusive cost of almost 100%, whereas the self cost is negligible when the real work is done in another function.

5.3.

If I double-click on a function down in the Call Graph view, it shows for function main() the same cost as the selected function. Isn't this supposed to be constant at 100%?

You have activated a function below main(), which obviously costs less than main() itself. For every function, it is shown only the part of the cost spent while the activated function is running; that is, the cost shown for any function can never be higher than the cost of the activated function.