cvs commit: src/gnu/usr.bin/groff/tmac mdoc.local src/lib Makefile src/lib/libpmc Makefile libpmc.c pmc.3 pmc.h src/share/doc/papers Makefile src/share/doc/papers/hwpmc Makefile hwpmc.ms src/share/examples/hwpmc README src/share/man/man4 Makefile ...

David O'Brien obrien at FreeBSD.org
Tue Apr 19 11:11:31 PDT 2005


On Tue, Apr 19, 2005 at 12:10:18PM +0200, Alexander Leidinger wrote:
> >jkoshy      2005-04-19 04:01:25 UTC
> > FreeBSD src repository
> > Log:
> > Bring a working snapshot of hwpmc(4), its associated libraries,
> > userland utilities and documentation into -CURRENT.
> 
> Verry interesting. I've read
> http://people.freebsd.org/~jkoshy/projects/perf-measurement/index.html
> 
> I assume this is like a portable version of the measurement backend in
> Intels VTune... at least I assume VTune does something like this
> itself.

Not quite - it isn't purely an Intel thing; nor is accessing event
counters all VTune does.

Every modern CPU has event counters.  Some CPU's have as little as 2
(Pentium Pro), others have 4 (Athlon64 and Opteron), I think IA-64 has
more.  You can program the CPU so that when an event occurs (or every N
events) to interrupt and let the handler code figure out what was running
at the time.  Events can be "fill data L1 cache from L2", "unaligned
access", "branch taken, predicted".  Or even clock tick (thus allowing
timer based profiling).

This PMC facility is much more similar to Linux's Oprofile than VTune or
AMD's CodeAnalyst.  It allows one to set and access the event counters.
You will need to find the applicable CPU docs so you know what [public]
events exist, and any "options" those events have.

-- 
-- David  (obrien at FreeBSD.org)


More information about the cvs-src mailing list