In FreeBSD 14 we plan to deprecate the _p.a special profiling libraries - see FreeBSD review https://reviews.freebsd.org/D30833 for details.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I mostly agree with this, but for the "silent ignoring" of -pg which this achieves. What would be the consequence of producing an error instead, like -pg not supported for FreeBSD >= 14 ? Too many unexpected failures?
Comment Actions
-pg is still supported (see the OPT_pg at line 253), gprof just won't be able to "see into" libc, libm, etc.
For example a trivial test case calling snprintf and strcmp in a loop, on FreeBSD 11 with _p libs:
% cumulative self self total time seconds seconds calls ms/call ms/call name 57.5 0.11 0.11 0 100.00% _mcount [1] 14.2 0.14 0.03 1000000 0.00 0.00 __vfprintf [5] 9.3 0.15 0.02 0 100.00% .mcount (43) 7.2 0.17 0.01 1000004 0.00 0.00 memset [6] 4.0 0.18 0.01 1000000 0.00 0.00 __sfvwrite [7] 2.6 0.18 0.01 1000000 0.00 0.00 snprintf [4] 2.5 0.19 0.00 2000001 0.00 0.00 memcpy [8] 1.4 0.19 0.00 1000000 0.00 0.00 localeconv_l [9] 0.8 0.19 0.00 1 1.60 63.36 main [2] ...
Same case linking against non-_p libs:
% cumulative self self total time seconds seconds calls ms/call ms/call name 100.0 0.00 0.00 1 2.58 2.58 main [1] 0.0 0.00 0.00 0 0.00% _start [2]