Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2005 11:11:29 -0700
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        cvs-src@FreeBSD.org
Subject:   Re: 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 ...
Message-ID:  <20050419181128.GA27443@dragon.NUXI.org>
In-Reply-To: <20050419121018.nq4ktq77r4goos08@netchild.homeip.net>
References:  <200504190401.j3J41QKh055169@repoman.freebsd.org> <20050419121018.nq4ktq77r4goos08@netchild.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050419181128.GA27443>