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.
source share