How to understand callgrind output with Kcachegrind

When profiling a log, Kcachegrind shows% inclusively as 13.92%. If it is not close to 100%, as indicated in the FAQ Q: 1 ??

Here is a screenshot of the profile log

enter image description here

+6
source share
1 answer

Not necessary.

main not a "real" entry point into your program, there are many things that happen before and after, for example, loading / unloading DLLs and building / destroying global variables (those that are dynamically initialized).

Those things take time, although they are usually insignificant.

Please note that there are flags for callgrind that allow you to start collecting statistics at the beginning of a function (for example, main ) depending on what you are really interested in.

+3
source

Source: https://habr.com/ru/post/901594/


All Articles