Top CPU users on my P3 testing box:
root@jennifer:/home/adrian/work/lusca/branches/LUSCA_HEAD/src# oplist ./squid
CPU: PIII, speed 634.464 MHz (estimated)
Counted CPU_CLK_UNHALTED events (clocks processor is not halted) with a unit mask of 0x00 (No unit mask) count 90000
samples % image name symbol name
1832194 8.7351 libc-2.3.6.so _int_malloc
969838 4.6238 libc-2.3.6.so memcpy
778086 3.7096 libc-2.3.6.so malloc_consolidate
647097 3.0851 libc-2.3.6.so vfprintf
479264 2.2849 libc-2.3.6.so _int_free
468865 2.2354 libc-2.3.6.so free
382189 1.8221 libc-2.3.6.so calloc
326540 1.5568 squid memPoolAlloc
277866 1.3247 libc-2.3.6.so re_search_internal
256727 1.2240 libc-2.3.6.so strncasecmp
249860 1.1912 squid httpHeaderIdByName
248918 1.1867 squid comm_select
238686 1.1380 libc-2.3.6.so strtok
215302 1.0265 squid statHistBin
Sigh. snprintf() leads to this:
root@jennifer:/home/adrian/work/lusca/branches/LUSCA_HEAD/src# opsymbol ./squid snprintf
CPU: PIII, speed 634.464 MHz (estimated)
Counted CPU_CLK_UNHALTED events (clocks processor is not halted) with a unit mask of 0x00 (No unit mask) count 90000
samples % image name symbol name
-------------------------------------------------------------------------------
15840 1.7869 squid safe_inet_addr
29606 3.3398 squid pconnPush
54021 6.0940 squid httpBuildRequestHeader
64916 7.3230 libc-2.3.6.so inet_ntoa
105692 11.9229 squid clientSendHeaders
127929 14.4314 squid urlCanonicalClean
196481 22.1646 squid pconnKey
265474 29.9476 squid urlCanonical
36879 100.000 libc-2.3.6.so snprintf
813284 91.7449 libc-2.3.6.so vsnprintf
36879 4.1602 libc-2.3.6.so snprintf [self]
12516 1.4119 libc-2.3.6.so vfprintf
9209 1.0388 libc-2.3.6.so _IO_no_init
Double sigh. Hi, the 90's called, they'd like their printf()-in-performance-critical code back.