c++ - GPROF output file error with NO info presented -


problem description

i trying gprof file code below:

//test.cpp #include<stdio.h> void func1() {     printf("inside func1");     for(int = 1;i<0xffffffff;i++); } void func2() {     printf("inside func2");     for(int = 1;i<0xffffffaa;i++); } int main() {     printf("inside main()");     for(int = 1; <= 1000; i++);     func1();     func2();     return 0; } 

and ran these commands in shell:

> g++ test.cpp -o test -pg > ./test inside main() inside func1  inside func2  > gprof -b test gmon.out > rep 

however, in file "rep", didnt find program running detail inside.

here "rep" file:

flat profile:  each sample counts 0.01 seconds.   %   cumulative   self              self     total             time   seconds   seconds    calls  ts/call  ts/call  name                   call graph   granularity: each sample hit covers 2 byte(s) no time propagated  index % time    self  children    called     name   index function name 

i've googled on internet not meeting similar problem. tell how solve this?

software version

g++ (gcc) 7.1.1 20170630

gnu gprof (gnu binutils) 2.28.0.20170506

thanks in advance.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -