From owner-freebsd-current@FreeBSD.ORG Fri May 26 15:18:56 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7960716A485 for ; Fri, 26 May 2006 15:18:56 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5744B43D48 for ; Fri, 26 May 2006 15:18:55 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so189492uge for ; Fri, 26 May 2006 08:18:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Oqk6BtgI41sxnDpkou45Xbz4n9R5qcTc/toc8xtOI5vD24e+w9MzMhG+dKg+M5ifUHicssudS86KgGS5yVnadtMu1rvEvPefuRACZz10epgUY0BKF1E2qNaZL8wGUljAN4ilYQvqRSlYGgqSEAZtRC28rnFR53qxCXnpZTCeH8g= Received: by 10.78.47.9 with SMTP id u9mr118845huu; Fri, 26 May 2006 08:18:21 -0700 (PDT) Received: by 10.78.71.19 with HTTP; Fri, 26 May 2006 08:18:21 -0700 (PDT) Message-ID: <84dead720605260818t7460cd6dp5de7311a1b5edc28@mail.gmail.com> Date: Fri, 26 May 2006 20:48:21 +0530 From: "Joseph Koshy" To: "gnn@freebsd.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060525065510.GA20475@what-creek.com> Cc: John Birrell , current@freebsd.org Subject: Re: DTrace for FreeBSD - Status Update X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2006 15:18:56 -0000 > 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