hwpmc & sampling

Andrew Gallatin gallatin at cs.duke.edu
Fri May 6 08:24:44 PDT 2005


Hi,


I was very excited to see the recent import of the hwpmc code.  I'd
like to do essentially what DCPI and Iprobe did on alpha and have a
way of doing system-wide sampling based profiling.   Eg, sample
the PC every so many clock ticks, or every so many instructions,
or cache misses, etc.

My current test box is a HTT P4 box, and I admit that I know nothing
about P4s.  Can you tell me the correct incantation to use to get
hwpmc in FreeBSD to do this for me?  What I've tried isn't working,
but I may just be an idiot.

My first guess was this:

# pmcstat -O /tmp/sample.stat -n 32768 -S tsc
pmcstat: ERROR: Cannot allocate system-mode pmc with specification "tsc": Function not implemented

I didn't have any more luck with what I assume is sampling based on
instructions:

# pmcstat -O /tmp/sample.stat -n 32768 -S  p4-instr-retired
pmcstat: ERROR: Cannot allocate system-mode pmc with specification "p4-instr-retired": Function not implemented


Thanks,

Drew


More information about the freebsd-current mailing list