More on $PCT ------------ Pct library behavior is controlled throught the PCT variable. Syntax for the value of this key environment variable is as follows. If $PCT contains: t truncate counts -- do not add to pre-existing ones p name pct file simply "pc.pct" in the current working directory v verbose mode -- print out some diagnostics l log mode instead of histogram mode cN circular log mode, at most N records into the past gB binning granuarity == B program bytes per bin wW width in bytes of the counter integer -- 1, 2, 4 qQ sampling time quantum is Q microseconds Ix x=V|R|P => use ITIMER_VIRT, ITIMER_REAL, ITIMER_PROF timers rR random intervals a mean inter-sample time of R*Q oPATH then if PATH is a directory, pctfile="PATH/basename(ARGV[0]).pct" else pctfile="PATH", which needs to be write()-able/creat()-able. NOTE: Whitespace after the 'o' is significant. PATH is considered to be the substring from the very first char after 'o' to the end of the string. Also note that, currently, directory names need a trailing '/' For example, $ PCT='vtp' ./myprogram generates the output ./myprogram: PC counting activated [ whatever other output myprogram has.. ] and a file: pc.pct which is truncate()ed before being used. As another example, assuming a directory "/home/foobar/pct" $ PCT='t o/tmp/pct/' ./myprogram writes counts to "/tmp/pct/myprogram.pct". "pct-ln" is pretty smart. E.g. "pct-ln /tmp/pct/myprogram.pct | pct-merge" will likely do something useful. This helps one keep profiling data organized, but easily accessible. It also helps ensure that file storage for profile counts is mmap()d to local, rather than remote files (which just helps avoid inaccuracies due to high overhead for counter updates).