The sixty second pmc howto
Andrew Gallatin
gallatin at cs.duke.edu
Thu Feb 23 07:20:02 PST 2006
Robert Watson writes:
> (2) Run "pmcstat -S instructions -O /tmp/sample.out" to start sampling of
> instruction retirement events, saving the results to /tmp/sample.out.
Dumb question, but what does "instructions" really mean? The number
of instructions, the time spent executing them, ?
<.....>
> Since there is no call graph information in the sample, the first few pages of
> gprof output will be of limited utility, but the summary table by function is
> the bit I found most useful:
You can use gprof -l to suppress the printing of the call-graph profile
My only problem with hwpmc is that it will not work for kernel
modules. I wonder if somebody with enough toolchain fu could take
kldstat output and produce a pre-linked elf executable image
containing kernel+modules which could be used for hwpmc, and also for
crash dump analysis. Or is there another, better, way to get a
complete symbol table of the kernel & all kernel modules?
> So if you're doing kernel performance work, and not already using pmc, you
> probably should be.
Very much agreed.
Drew
More information about the freebsd-current
mailing list