Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2006 20:48:21 +0530
From:      "Joseph Koshy" <joseph.koshy@gmail.com>
To:        "gnn@freebsd.org" <gnn@freebsd.org>
Cc:        John Birrell <jb@what-creek.com>, current@freebsd.org
Subject:   Re: DTrace for FreeBSD - Status Update
Message-ID:  <84dead720605260818t7460cd6dp5de7311a1b5edc28@mail.gmail.com>
In-Reply-To: <m264jt2mjw.wl%gnn@neville-neil.com>
References:  <20060525065510.GA20475@what-creek.com> <m264jt2mjw.wl%gnn@neville-neil.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> But, I have a naive question.  Should this be integrated in
> some way with the hwpmc work of Joseph Koshy since I think it
> could be useful for DTRace to get information from the CPU as
> well.

Disclaimer: I've only just started reading about DTrace.

There appear to be two ways to integrate hwpmc and DTrace:

 - Augment the D virtual machine with a primitive that can
   read PMC values (e.g.- using RDPMC or RDMSR instructions
   on x86 CPUs).  Make this primitive available
   to scripts for allocating and reading from PMCs (say
   a "pmcread()" builtin function).

   This approach would work well with counting mode PMCs
   (both process and system-mode counting PMCs) and would
   allow PMCs to be read at arbitrary points of time.

   We'll need a way of allocating system-wide & process-mode
   PMCs; this could be done in userland (in dtrace(8)).

 - hwpmc(4) can be augmented to be a 'DTrace provider'
   allowing D scripts to be run, say when a PC sample is
   recorded.

-- 
FreeBSD Developer,     http://people.freebsd.org/~jkoshy



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