From owner-freebsd-current@FreeBSD.ORG Fri May 6 15:24:44 2005 Return-Path: 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 0843116A4D3; Fri, 6 May 2005 15:24:44 +0000 (GMT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89D3A43D9D; Fri, 6 May 2005 15:24:43 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.13.4/8.13.4) with ESMTP id j46FOgpZ014588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 May 2005 11:24:42 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id j46FObbu055660; Fri, 6 May 2005 11:24:37 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17019.35893.652541.618655@grasshopper.cs.duke.edu> Date: Fri, 6 May 2005 11:24:37 -0400 (EDT) To: jkoshy@freebsd.org X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: freebsd-current@freebsd.org Subject: hwpmc & sampling X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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, 06 May 2005 15:24:44 -0000 Hi, I was very excited to see the recent import of the hwpmc code. I'd like to do essentially what DCPI and Iprobe did on alpha and have a way of doing system-wide sampling based profiling. Eg, sample the PC every so many clock ticks, or every so many instructions, or cache misses, etc. My current test box is a HTT P4 box, and I admit that I know nothing about P4s. Can you tell me the correct incantation to use to get hwpmc in FreeBSD to do this for me? What I've tried isn't working, but I may just be an idiot. My first guess was this: # pmcstat -O /tmp/sample.stat -n 32768 -S tsc pmcstat: ERROR: Cannot allocate system-mode pmc with specification "tsc": Function not implemented I didn't have any more luck with what I assume is sampling based on instructions: # pmcstat -O /tmp/sample.stat -n 32768 -S p4-instr-retired pmcstat: ERROR: Cannot allocate system-mode pmc with specification "p4-instr-retired": Function not implemented Thanks, Drew