Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!genrad!grkermit!masscomp!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!gwyn@brl-vld From: gwyn%brl-vld@sri-unix.UUCP Newsgroups: net.unix Subject: Re: prof question Message-ID: <16172@sri-arpa.UUCP> Date: Mon, 30-Jan-84 16:00:49 EST Article-I.D.: sri-arpa.16172 Posted: Mon Jan 30 16:00:49 1984 Date-Received: Thu, 2-Feb-84 01:40:53 EST Lines: 20 From: Doug Gwyn (VLD/VMB)Profiling samples one's process every so often (clock tick typically) and records where the PC (program counter) is each sample. This data is stored as a histogram with "bin width" usually equal to several bytes. The "quantization errors" can take three forms: - All PC locations within a bin are counted together; - Since the sampling is periodic it may not be representative of the real PC distribution due to beating with code periodicities (especially if code and sampling are driven by the same clock); - Because the code is sampled rather than exhaustively traced, some sections can be missed, and in general Poisson sampling statistics apply (i.e. sampling error for a bin is roughly the square root of the bin count). Each subroutine on "prof" output summary includes only the time spent in its PC range, so a call to another routine will result in time spent in the called routine being tallied under its name rather than under the caller's name.