FreeBSD src
Go to file
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
bin Give .Dd a tummy rub, forgotten on my last commit. 2005-09-30 02:12:15 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r150974, 2005-10-05 15:19:56 +00:00
crypto Regenerate 2005-09-03 07:08:51 +00:00
etc stop RFC 4193 address on the outside interface. 2005-10-05 07:00:42 +00:00
games Nuke duplicates found via fuzzy logic: 2005-09-28 18:18:29 +00:00
gnu Compile with -DHAVE_LSTAT since, for whatever reason, the configure script 2005-10-06 09:49:37 +00:00
include Add pthread_timedjoin_np prototype. 2005-10-04 07:23:56 +00:00
kerberos5 Bump the shared library version number of all libraries that have not 2005-07-22 17:19:05 +00:00
lib When removing the local domain, only do so when the result will be a 2005-10-05 04:42:20 +00:00
libexec Clean out the leftovers from the i386_set_gsbase() TLS conversion. 2005-06-29 23:15:36 +00:00
release New release notes: 2005-10-03 17:24:20 +00:00
rescue Respect the YES_HESIOD build variable. 2005-08-06 16:53:55 +00:00
sbin Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes. 2005-10-07 06:39:08 +00:00
secure Update for OpenSSH 4.2p1. 2005-09-03 07:10:33 +00:00
share o Mention the fact dcons(4) depends on "options GDB". 2005-10-07 06:43:04 +00:00
sys We don't need 'imp' here. 2005-10-07 10:30:47 +00:00
tools Don't hard-code port numbers, let the user specify them. 2005-10-06 12:20:33 +00:00
usr.bin Improve printing of self times in the flat profile for functions that 2005-10-07 10:59:41 +00:00
usr.sbin Catch up with the import of bsnmp-1.11. Add a couple of new 2005-10-04 15:03:39 +00:00
COPYRIGHT Complete 2005 transition. 2005-01-01 07:29:20 +00:00
LOCKS Document the previously existing RELENG_[45]_* security branch locks. 2005-06-02 22:57:30 +00:00
MAINTAINERS Add myself as a maintainer of Bluetooth code 2005-08-25 17:14:39 +00:00
Makefile Add delete-old and delete-old-libs targets: 2005-07-23 14:23:30 +00:00
Makefile.inc1 Fix a couple of typos 2005-08-23 07:58:55 +00:00
ObsoleteFiles.inc Do not commit before the first cup of coffee. Other entries don't have a 2005-09-28 09:19:17 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Note that kern.polling.enable is deprecated. 2005-10-01 20:53:51 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html