I am trying to use the gprof: command gprof -s executable.exe gmon.out gmon.sumto combine the profiling data collected from two runs of my programs. But the following error appears:
gprof: 340,320,7348 bytes are allocated from memory after a total of 196,608 bytes
My program is pretty simple (just one loop for). If I run it once, the runtime is too short (it shows 0.00s) for the gprof entry.
In CygWin, I do the following steps:
gcc -pg -o fl forAndWhilLoop.c
fl (run the program)
mv gmon.out gmon.sum
fl (run the program)
gprof -s fl.exe gmon.out gmon.sum
gprof fl.exe gmon.sum> gmon.out
gprof fl.exe
My program:
int main(void)
{
int fac=1;
int count=10;
int k;
for(k=1;k<=count;k++)
{
fac = fac * k;
}
return 0;
}
So can someone help me with this problem? Thank!
source
share