From owner-freebsd-current@FreeBSD.ORG Thu Feb 23 15:20:02 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 33CA816A420; Thu, 23 Feb 2006 15:20:02 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97B6143D48; Thu, 23 Feb 2006 15:20:01 +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 k1NFJwFk014165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Feb 2006 10:19:58 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id k1NFJpbW096258; Thu, 23 Feb 2006 10:19:51 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17405.53911.686306.362353@grasshopper.cs.duke.edu> Date: Thu, 23 Feb 2006 10:19:51 -0500 (EST) To: Robert Watson In-Reply-To: <20060223143856.O9642@fledge.watson.org> References: <20060223143856.O9642@fledge.watson.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Cc: current@FreeBSD.org Subject: Re: The sixty second pmc howto 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: Thu, 23 Feb 2006 15:20:02 -0000 Robert Watson writes: > (2) Run "pmcstat -S instructions -O /tmp/sample.out" to start sampling of > instruction retirement events, saving the results to /tmp/sample.out. Dumb question, but what does "instructions" really mean? The number of instructions, the time spent executing them, ? <.....> > Since there is no call graph information in the sample, the first few pages of > gprof output will be of limited utility, but the summary table by function is > the bit I found most useful: You can use gprof -l to suppress the printing of the call-graph profile My only problem with hwpmc is that it will not work for kernel modules. I wonder if somebody with enough toolchain fu could take kldstat output and produce a pre-linked elf executable image containing kernel+modules which could be used for hwpmc, and also for crash dump analysis. Or is there another, better, way to get a complete symbol table of the kernel & all kernel modules? > So if you're doing kernel performance work, and not already using pmc, you > probably should be. Very much agreed. Drew