When profiling the log Kcachegrind shows %of inclusive as 13.92%. Should it not be close to 100% as mentioned in the FAQ Q:1??

Here is the screenshot of the profile log

enter image description here

有帮助吗?

解决方案

Not necessarily.

main is not the "real" entry point of your program, there is lot of stuff going on before and after, for example loading/unloading DLLs and the construction/destruction of globals (those which are dynamically initialized).

Those things take time, although normally negligible.

Note that there are flags for callgrind that allow to start the collection of statistics at the start of a function (for example main) depending on what you are really interested in.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top