I am profiling some C++ code with callgrind
. This is my first time doing so. I am finding that the highest level function (the one which I assume is calling all the shots to start the program running) is called _dyld_start
. I am wondering what exactly this is.
Also, on some of my programs that take a long time to run, my main()
function takes up about 99% of the time of all the functions being called by _dyld_start
; however, on my program that takes a shorter time to run (about half a second) I find that main()
is only taking about 85% of _dyld_start
's time, the rest is going to dyldbootstrap::start()
. I assume that that is a function associated with starting a C++ program. Is it reasonable for it to be taking 85% of _dyld_start
's run time?
I am compiling my code using the C++11 standard. I am compiling on my OS/X so I am using clang
. My valgrind
version is 3.10.0.