i’m analysing my code with gprof, and i get the following output:
% cumulative self self total
time seconds seconds calls ms/call ms/call name
59.22 0.58 0.58 48 12.09 18.81 _GLOBAL__sub_I_inputHeight
inputHeight is a global variable. I have no idea what GLOBAL_sub_I_inputHeight means, but it is called 48 times, and consumes 60% (0,6) of the exection time.
Any ideas?
when you run run a gprofiled program, it writes the data in a file, usually
gmon.out. That file contains the addresses of the functions, not the names. When you read the data with thegprofutility, it resolves the names using the debugging information present in the program.That means that if you run the program, recompile it and execute
gprofwithout re-running the program, the output is meaningless.