I am currently using the min-gw GCC profiler tool gprof
to find the slow portions of my code. I compile the code with
gcc -p -pg -o3 example.c -o example.exe
After running the file I use
gprof example.exe > data.txt
My program prints its running time to be ~8 seconds, but the data.txt only shows the functions of my program, which account for 3.47 seconds. I imagine that unaccounted for time is used in other C functions, such as malloc
, free
, etc, but I still need to know where the time is being used. Any thoughts?