Problem with gprof for code containing static functions
Dragos Tarcatu
tarcatu_dragosh@yahoo.com
Wed Jul 9 07:49:00 GMT 2014
I've been encountering some problems using gprof (GNU gprof (GNU Binutils) 2.24.51.20140623) in the most recent cygwin (32 bits) . Basically gprof seems to be missing static functions calls in the flat profile report. For the attached source file (compiled with -Wall -g -pedantic -std=c99 -pg -O0) if I disable the USE_STATIC macro the flat report seems ok.
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
89.24 1.99 1.99 100000000 0.00 0.00 f5
8.07 2.17 0.18 _mcount_private
1.79 2.21 0.04 1000000 0.00 0.00 f4
0.90 2.23 0.02 _fentry__
0.00 2.23 0.00 10000 0.00 0.00 f3
0.00 2.23 0.00 100 0.00 0.02 f2
0.00 2.23 0.00 1 0.00 2.03 f1
But if I enable it (making those functions static) I get pretty weird results:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
87.78 1.94 1.94 f5
8.60 2.13 0.19 _mcount_private
1.81 2.17 0.04 _fentry__
1.81 2.21 0.04 f4
0.00 2.21 0.00 101010000 0.00 0.00 __gcc_deregister_frame
0.00 2.21 0.00 100 0.00 0.00 f2
0.00 2.21 0.00 1 0.00 0.00 f1
Is this a known issue?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140709/8a0ab43a/attachment.c>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list