prof question
gwyn%brl-vld at sri-unix.UUCP
gwyn%brl-vld at sri-unix.UUCP
Tue Jan 31 07:00:49 AEST 1984
From: Doug Gwyn (VLD/VMB) <gwyn at brl-vld>
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.
More information about the Comp.unix
mailing list