From owner-freebsd-smp@FreeBSD.ORG Wed Jul 11 17:45:44 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EF7B16A469 for ; Wed, 11 Jul 2007 17:45:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC7E13C4BC for ; Wed, 11 Jul 2007 17:45:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 5172447456; Wed, 11 Jul 2007 13:19:30 -0400 (EDT) Date: Wed, 11 Jul 2007 18:19:30 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Girish Motwani In-Reply-To: <2779e6080707020843g55be2546w722b08a2023d016a@mail.gmail.com> Message-ID: <20070711181520.R68820@fledge.watson.org> References: <2779e6080707020843g55be2546w722b08a2023d016a@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-smp@freebsd.org Subject: Re: kgmon on multiprocessors X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2007 17:45:44 -0000 On Mon, 2 Jul 2007, Girish Motwani wrote: > Does the kernel profiling tool kgmon give accurate information on > multiprocessor systems ? Or is there some other tool for SMP systems ? I > tried looking up the archives for information on this, but could not find > any. Girish-- Take a look at hwpmc(4), pmccontrol(8), and pmcstat(8). These allow you to do kernel-only or systemic samplic using performance monitoring counters, including looking at CPU time, cache misses, instructions retired, etc. I posted a sixty second howto here: http://lists.freebsd.org/pipermail/freebsd-current/2006-February/061096.html Among other things, you can generate gprof output from PMC; right now, that's without full stack traces (and hence callgraphs), but Joseph Koshy has work in P4 implementing stack trace support. I imagine this will go in after the 7.0 freeze lets up. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-smp@FreeBSD.ORG Fri Jul 13 20:09:34 2007 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E5DA16A402; Fri, 13 Jul 2007 20:09:34 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (mailgate.nlsystems.com [80.177.232.242]) by mx1.freebsd.org (Postfix) with ESMTP id 8277213C4AA; Fri, 13 Jul 2007 20:09:33 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from herring.rabson.org (herring.rabson.org [80.177.232.250]) by itchy.rabson.org (8.13.3/8.13.3) with ESMTP id l6DJXiqI003787; Fri, 13 Jul 2007 20:33:44 +0100 (BST) (envelope-from dfr@rabson.org) From: Doug Rabson To: freebsd-smp@freebsd.org Date: Fri, 13 Jul 2007 20:33:43 +0100 User-Agent: KMail/1.9.6 References: <2779e6080707020843g55be2546w722b08a2023d016a@mail.gmail.com> <20070711181520.R68820@fledge.watson.org> In-Reply-To: <20070711181520.R68820@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707132033.43755.dfr@rabson.org> X-Virus-Scanned: ClamAV 0.87.1/3662/Fri Jul 13 18:53:47 2007 on itchy.rabson.org X-Virus-Status: Clean Cc: Girish Motwani , Robert Watson Subject: Re: kgmon on multiprocessors X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 20:09:34 -0000 On Wednesday 11 July 2007, Robert Watson wrote: > On Mon, 2 Jul 2007, Girish Motwani wrote: > > Does the kernel profiling tool kgmon give accurate > > information on multiprocessor systems ? Or is there some other > > tool for SMP systems ? I tried looking up the archives for > > information on this, but could not find any. > > Girish-- > > Take a look at hwpmc(4), pmccontrol(8), and pmcstat(8). These allow > you to do kernel-only or systemic samplic using performance > monitoring counters, including looking at CPU time, cache misses, > instructions retired, etc. I posted a sixty second howto here: > > > http://lists.freebsd.org/pipermail/freebsd-current/2006-February/0610 >96.html > > Among other things, you can generate gprof output from PMC; right > now, that's without full stack traces (and hence callgraphs), but > Joseph Koshy has work in P4 implementing stack trace support. I > imagine this will go in after the 7.0 freeze lets up. That reminds me - does anyone know what I have to hack to make hwpmc work on my Intel(R) Core(TM)2 Quad CPU (Id = 0x6f7, Stepping = 7)?