From owner-cvs-src@FreeBSD.ORG Tue Apr 19 18:11:31 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EAEE16A4CE; Tue, 19 Apr 2005 18:11:31 +0000 (GMT) Received: from dragon.NUXI.org (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF92E43D31; Tue, 19 Apr 2005 18:11:30 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.NUXI.org (obrien@localhost [127.0.0.1]) by dragon.NUXI.org (8.13.3/8.13.3) with ESMTP id j3JIBTLZ027652; Tue, 19 Apr 2005 11:11:29 -0700 (PDT) (envelope-from obrien@dragon.NUXI.org) Received: (from obrien@localhost) by dragon.NUXI.org (8.13.3/8.13.1/Submit) id j3JIBTJw027651; Tue, 19 Apr 2005 11:11:29 -0700 (PDT) (envelope-from obrien) Date: Tue, 19 Apr 2005 11:11:29 -0700 From: "David O'Brien" To: Alexander Leidinger Message-ID: <20050419181128.GA27443@dragon.NUXI.org> References: <200504190401.j3J41QKh055169@repoman.freebsd.org> <20050419121018.nq4ktq77r4goos08@netchild.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050419121018.nq4ktq77r4goos08@netchild.homeip.net> X-Operating-System: FreeBSD 6.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 User-Agent: Mutt/1.5.9i cc: Joseph Koshy cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org 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 ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2005 18:11:31 -0000 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)