freebsd-dev/usr.bin
Bruce Evans 0b146898f0 Improve printing of self times in the flat profile for functions that
appear to be never called:

(1) If a function is never called according to its call count but it
    must have been called because its child time is nonzero, then print
    it in the flat profile.  Previously, if its call count was zero
    then we only printed it in the flat profile if its self time was
    nonzero.

(2) If a function has a zero call count but has a nonzero self or child
    time, then print its total self time in the self time per call
    column as a percentage of the total (self + child) time.  It is
    not possible to print the times per call in this case because the
    call count is zero.  Previously, this was handled by leaving both
    per-call columns blank.  The self time is printed in another column
    but there was no way to recover the total time.

(1) partially fixes the case of the "never called" function main() and
prepares for (2) to apply to main() and other functions.  Profiling
of main() was lost in the conversion from a.out to ELF, so main()'s
call count has always been zero for many years; then in the common
case where main() is a tiny function, it gets no profiling ticks, so
main() was completely lost in the flat profile.

(2) improves mainly cases like kernel threads.  Most kernel threads
appear to be never called because they are always started before
userland can run to turn on profiling.  As for main(), the fact that
they are called is not very interesting and their callers are
uninteresting, but their relative self time is interesting since they
are long-running.

Almost always printing percentages in the per-call columns would be
more useful than almost always printing 0.0ms.  0.1ms is now a long
time, so only very large functions take that long per call.  The accuracy
per call can approach 1-10 nsec provided programs are run for about
100000 times as long as is necessary to get this accuracy with high
resolution kernel profiling.
2005-10-07 10:59:41 +00:00
..
alias Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
apply Sort sections. 2005-01-18 13:43:56 +00:00
asa Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
at While revision 1.26 fixed the code to really subtract 3600 due to 2005-08-18 08:18:02 +00:00
atm Fix build in the !NOATM case by using the begemot library in place of 2004-09-24 22:10:34 +00:00
awk Add temporary patches to make one-true-awk respect locale's collating order 2005-05-17 14:54:33 +00:00
banner Document message length limit. 2005-01-25 22:24:04 +00:00
basename Sort sections. 2005-01-18 13:43:56 +00:00
biff Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
bluetooth Let bsd.prog.mk set SRCS and MAN to their default values. 2005-01-28 16:08:11 +00:00
brandelf Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
bsdiff Include ../Makefile.inc, since without it programs get installed in the 2005-08-06 02:37:21 +00:00
bzip2 Don't use a patch w/in /usr/src. Programmatically change files when needed. 2005-05-31 22:16:49 +00:00
bzip2recover Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
c89 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
c99 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
calendar Adding myself to calendar.freebsd 2005-10-06 19:16:55 +00:00
cap_mkdb Add endianness support to cap_mkdb(1), useful for cross builds. 2005-02-22 23:29:54 +00:00
catman Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
chat Rename logf --> chat_logf to avoid naming conflicts 2003-10-31 06:22:03 +00:00
checknr Document input line length limit. 2005-01-25 22:32:48 +00:00
chkey Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set. 2004-11-13 20:40:32 +00:00
chpass Cross-reference pw(8) into chpass(1), passwd(1), and vipw(8). 2005-08-02 21:38:03 +00:00
cksum Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
cmp Add a -h option to tell cmp not to follow symbolic links. 2005-08-23 13:13:13 +00:00
col Expand *n't contractions. 2005-02-13 22:25:33 +00:00
colcrt Expand *n't contractions. 2005-02-13 22:25:33 +00:00
colldef Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
colrm Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
column Take a swing at using roundup(). 2005-01-25 01:35:02 +00:00
comm Document input line length limit. 2005-01-25 22:32:48 +00:00
compile_et
compress Several changes: Added a BUGS section with several bugs. And 2005-09-07 18:40:09 +00:00
csplit Document input line length limit. 2005-01-25 22:32:48 +00:00
ctags Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
cut Sort sections. 2005-01-18 13:43:56 +00:00
dig Disable thread support in BIND. It appears to reduce performance rather 2005-07-25 14:44:11 +00:00
dirname Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
du Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ee - Remove MLINKS to nonexistant manpages 2005-07-14 20:29:08 +00:00
elf2aout Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
elfdump Sort sections. 2005-01-18 13:43:56 +00:00
enigma - Remove MLINKS to nonexistant manpages 2005-07-14 20:29:08 +00:00
env Fix minor memory leak when expanding ${variable}s 2005-07-18 22:18:16 +00:00
expand Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
false
fetch Expand *n't contractions. 2005-02-13 22:25:33 +00:00
file Expand contractions. 2005-02-13 23:45:54 +00:00
file2c Fix all the spelling mistakes I could find in the man pages for words 2005-07-31 03:30:48 +00:00
find Fixes for gcc4.x. 2005-08-25 13:44:02 +00:00
finger Setting .nofinger will not hide you from root. 2005-09-19 10:11:47 +00:00
fmt Remove unnecessary SRCS= where could be guessed directly by our 2005-01-27 14:52:47 +00:00
fold Add cross-reference to fmt(1) and a fairly standard ENVIRONMENT section. 2004-08-02 11:15:01 +00:00
from Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
fstat Introduce kdevtoname, which when given the kernel address of a 2005-07-30 20:00:13 +00:00
fsync Correct some style nits that I have mistakenly submitted as 2005-01-26 15:17:25 +00:00
ftp Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
gcore Remove a.out support from gcore(1). 2004-11-27 06:46:48 +00:00
gencat Our bsd.*.mk only supports 6 WARNS levels and we should not use higher values 2005-06-30 11:56:31 +00:00
getconf Support correct programming environment name for amd64. 2005-02-18 21:53:05 +00:00
getopt Expand *n't contractions. 2005-02-13 22:25:33 +00:00
gprof Improve printing of self times in the flat profile for functions that 2005-10-07 10:59:41 +00:00
head Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
hesinfo Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
hexdump Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
host Disable thread support in BIND. It appears to reduce performance rather 2005-07-25 14:44:11 +00:00
id Add flag to choose whether to use getgrouplist(3) or getgroups(2) 2005-04-29 10:11:18 +00:00
indent Fix all the spelling mistakes I could find in the man pages for words 2005-07-31 03:30:48 +00:00
ipcrm Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
ipcs Change the data type of the upper shared memory limits from a signed 2005-08-06 07:20:18 +00:00
join Expand *n't contractions. 2005-02-13 22:25:33 +00:00
jot Sort sections. 2005-01-18 13:43:56 +00:00
kdump Update kdump manual page with information on the dump format. 2005-01-28 12:17:33 +00:00
keylogin Deal with double whitespace. 2004-07-03 00:24:45 +00:00
keylogout Removed unnecessary dependencies on librpcsvc. 2004-02-04 11:59:08 +00:00
killall Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
ktrace Sort sections. 2005-01-18 13:43:56 +00:00
ktrdump Markup and wording fixes. 2005-06-14 11:50:53 +00:00
lam Call usage() instead of being insolent. 2005-08-05 01:04:36 +00:00
last Expand *n't contractions. 2005-02-13 22:25:33 +00:00
lastcomm Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ldd The type of some aout header types changed to uint_32, so now we need 2004-06-29 21:13:15 +00:00
leave
less Correct the script name to be "zless.sh". This avoids an extra cp/chmod 2005-05-17 11:41:01 +00:00
lessecho Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
lesskey
lex NODOCCOMPRESS -> NO_DOCCOMPRESS 2004-12-21 09:33:47 +00:00
limits Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
locale Use the standard section name. 2005-01-18 20:54:50 +00:00
locate Most users probably aren't interested in locating 13000+ files named 2005-08-22 08:22:48 +00:00
lock Expand *n't contractions. 2005-02-13 22:25:33 +00:00
lockf Un-break handling of -t 0 which was broken in my previous commit. 2005-10-05 22:02:07 +00:00
logger Reduce compiler warning: variable might be used uninitialized, by giving 2005-05-29 16:04:46 +00:00
login o Teach login(1) to respect "hushlogin" and "nocheckmail" attributes 2005-06-01 12:23:06 +00:00
logins Fix markup. 2004-03-06 23:36:41 +00:00
logname - Remove useless includes 2005-01-25 14:22:20 +00:00
look Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
lorder Oops, revert last commit (the manpage is still built in objdir). 2005-09-28 07:54:18 +00:00
lsvfs spell "file system" correctly 2005-01-24 20:06:16 +00:00
m4 Let bsd.prog.mk set SRCS and MAN to their default values. 2005-01-28 16:08:11 +00:00
mail Sync usage screen with manpage. 2005-10-07 10:18:44 +00:00
make Remove redundant `\&' escapes. 2005-09-27 08:06:21 +00:00
makewhatis Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
mesg Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
minigzip Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
ministat In 2003, a -s flag was added to ministat to separate the 2005-07-21 08:32:56 +00:00
mkdep Sort sections. 2005-01-18 13:43:56 +00:00
mkfifo Sort sections. 2005-01-18 13:43:56 +00:00
mklocale Make <runefile.h> internal to libc. 2005-05-16 09:32:41 +00:00
mkstr Fixed a misspelling of 0 as NULL. 2004-03-14 05:51:20 +00:00
mktemp Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
mkuzip - check for geom_uzip module presence using kldstat -m. 2005-05-11 17:02:38 +00:00
msgs Cleanup: 2005-01-17 17:45:38 +00:00
mt A minor overhaul: added comments, split cmds in 2, changed synopsis. 2005-09-30 17:31:39 +00:00
nc Fix bugs in the previous commit. 2005-02-07 08:44:34 +00:00
ncal Remove unnecessary SRCS= where could be guessed directly by our 2005-01-27 14:52:47 +00:00
ncplist
ncplogin Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
netstat Remove bridge(4) from the tree. if_bridge(4) is a full functional 2005-09-27 18:10:43 +00:00
newgrp Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
newkey Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
nfsstat Fix a few cases that relied on 'implicit int' (constraint violation in C99). 2004-07-11 17:37:33 +00:00
nice Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
nl Remove unused variables. 2005-04-09 14:31:41 +00:00
nohup Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
nslookup Disable thread support in BIND. It appears to reduce performance rather 2005-07-25 14:44:11 +00:00
nsupdate Disable thread support in BIND. It appears to reduce performance rather 2005-07-25 14:44:11 +00:00
objformat
opieinfo Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
opiekey
opiepasswd Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
pagesize
passwd Cross-reference pw(8) into chpass(1), passwd(1), and vipw(8). 2005-08-02 21:38:03 +00:00
paste Sort sections. 2005-01-18 13:43:56 +00:00
pathchk Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
pkill Revert previous behaviour of '-F' option and add '-L' option, which will 2005-08-25 20:10:47 +00:00
pr Sort sections. 2005-01-18 13:43:56 +00:00
printenv Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
printf Prefer {u,}intmax_t over the deprecated {u_,}quad_t. 2005-08-05 08:18:00 +00:00
quota Remove an unused #define. md5's with and without this commit match. 2005-03-13 17:58:31 +00:00
renice Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
rev If ferror is true, we must reset the error indicator. 2004-12-15 06:24:57 +00:00
rlogin Use socklen_t where appropriate. 2005-08-05 09:58:49 +00:00
rpcgen In version 1.8 I botched findval()'s type, fix. 2005-09-02 21:51:18 +00:00
rpcinfo Fixed a misspelling of '\0' as NULL. 2004-03-11 10:22:25 +00:00
rs - Set negative row or column argument values to zero. 2005-04-28 12:37:15 +00:00
rsh - Remove MLINKS to nonexistant manpages 2005-07-14 20:29:08 +00:00
rup Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ruptime - Do not allocate memory to entries in /var/rwho which have been down for 2005-09-02 14:58:26 +00:00
rusers Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
rwall Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
rwho It's actually 11 minutes when the machine is assumed to be down and removed 2005-08-07 11:48:44 +00:00
script Deal with double whitespace. 2004-07-03 00:24:45 +00:00
sed The function inplace_edit() doesn't exist anymore, remove the prototype. 2005-09-24 13:18:30 +00:00
shar Sort sections. 2005-01-18 13:43:56 +00:00
showmount Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
smbutil Make smbfs capable to use 16bit char set in filenames. 2005-05-04 15:05:46 +00:00
sockstat Don't free(sock) before it's even allocated. 2005-06-10 06:36:03 +00:00
split Include option-argument names in the list in the DESCRIPTION section. 2005-08-30 12:48:28 +00:00
stat Markup and wording fixes. 2005-06-14 11:50:53 +00:00
su Sort sections. 2005-01-18 13:43:56 +00:00
systat Fix all the spelling mistakes I could find in the man pages for words 2005-07-31 03:30:48 +00:00
tabs Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
tail Unbreak tail -f on non-local filesystems. 2005-08-26 08:15:57 +00:00
talk Use socklen_t where appropriate. 2005-03-11 14:17:12 +00:00
tar Fix -u with absolute paths (e.g., "tar -uf foo.tar /bar") by handling 2005-09-24 21:19:57 +00:00
tcopy Expand *n't contractions. 2005-02-13 22:25:33 +00:00
tee Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
telnet Remove kludges intended to support src trees with partial obj trees. 2005-06-10 06:12:53 +00:00
tftp Use socklen_t where appropriate. 2005-08-05 09:58:49 +00:00
time Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
tip - Remove MLINKS to nonexistant manpages 2005-07-14 20:29:08 +00:00
top (1) Revert unnecessary indentation changes I committed as part of the 2005-05-18 13:42:51 +00:00
touch Expand *n't contractions. 2005-02-13 22:25:33 +00:00
tput Expand *n't contractions. 2005-02-13 22:25:33 +00:00
tr Remove unused variables. 2005-04-09 14:31:41 +00:00
true
truncate Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
truss Fix all the spelling mistakes I could find in the man pages for words 2005-07-31 03:30:48 +00:00
tset Reduce compiler warning: variable might be used uninitialized, by giving 2005-05-29 15:49:53 +00:00
tsort Move FreeBSD Id outside of copyright. Initialize variable. 2005-05-29 15:47:31 +00:00
tty Expand *n't contractions. 2005-02-13 22:25:33 +00:00
uac Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
ul Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
uname Sort sections. 2005-01-18 13:43:56 +00:00
unexpand Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
unifdef Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
uniq Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
units Expand *n't contractions. 2005-02-13 22:25:33 +00:00
unvis
usbhidaction Let bsd.prog.mk set SRCS and MAN to their default values. 2005-01-28 16:08:11 +00:00
usbhidctl Sort sections. 2005-01-18 13:43:56 +00:00
users
uudecode Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
uuencode - Remove MLINKS to nonexistant manpages 2005-07-14 20:29:08 +00:00
uuidgen Mention that uuidgen(1) generates DCE version 1 UUIDs only 2005-09-07 07:49:21 +00:00
vacation Remove kludges intended to support src trees with partial obj trees. 2005-06-10 06:12:53 +00:00
vgrind Fix vgrind(1) indexing I broke in previous revision. 2005-09-23 12:55:22 +00:00
vi Replaced afterinstall: with equivalent FILES and SYMLINKS. 2004-10-18 17:16:01 +00:00
vis Expand *n't contractions. 2005-02-13 22:25:33 +00:00
vmstat Use libmemstat(3)'s kvm support for malloc(9) rather than hand-extracting 2005-08-06 13:56:21 +00:00
w Use the ki_udata field that was recently-added to kinfo_proc, instead of 2005-06-04 23:40:09 +00:00
wall Mention in the BUGS section that write and wall bogusly use the sender's 2004-07-17 04:15:27 +00:00
wc Fix mismerge. 2005-02-26 04:14:20 +00:00
what Markup and wording fixes. 2005-06-14 11:50:53 +00:00
whereis Remove unused variables. 2005-04-09 14:31:41 +00:00
which Require at least one argument. 2005-02-10 16:04:22 +00:00
who Move variable initialization to reduce compiler warning. 2005-05-29 15:52:48 +00:00
whois Reduce compiler warning: variable might be used uninitialized, by giving 2005-05-29 15:49:53 +00:00
window Fixes for gcc 4.x. 2005-08-25 14:09:35 +00:00
write Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
xargs Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
xinstall Fix all the spelling mistakes I could find in the man pages for words 2005-07-31 03:30:48 +00:00
xlint Include <err.h> where needed. Add $FreeBSD$ where missing. 2005-08-05 09:07:42 +00:00
xstr Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 10:14:11 +00:00
yacc Sort sections. 2005-01-18 13:43:56 +00:00
yes
ypcat Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ypmatch Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ypwhich Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
Makefile Connect smbfs build on powerpc. 2005-09-19 08:13:43 +00:00
Makefile.inc