From owner-freebsd-current@FreeBSD.ORG Fri Jul 29 10:04:02 2005 Return-Path: X-Original-To: freebsd-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 0A54716A41F; Fri, 29 Jul 2005 10:04:02 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from efnet-math.org (efnet-math.org [69.60.109.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B6AA43D62; Fri, 29 Jul 2005 10:04:00 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [151.28.127.53] (ppp-53-127.28-151.libero.it [151.28.127.53]) (authenticated bits=0) by efnet-math.org (8.13.1/8.13.1) with ESMTP id j6TA3jTM012479 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Fri, 29 Jul 2005 06:03:48 -0400 In-Reply-To: <20050729031107.C2FD616A41F@hub.freebsd.org> References: <20050729031107.C2FD616A41F@hub.freebsd.org> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <63730E21-8766-4A87-8878-EACE167E64C5@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Suleiman Souhlal Date: Fri, 29 Jul 2005 12:03:37 +0200 To: Joseph Koshy X-Mailer: Apple Mail (2.733) Cc: Martin Cracauer , freebsd-current@FreeBSD.org Subject: Re: PMC (performance counters) problems - kernel panic in 6-beta1 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, 29 Jul 2005 10:04:02 -0000 Hi, On Jul 29, 2005, at 5:11 AM, Joseph Koshy wrote: > > > >> Another question, what is the difference of -s versus -S and -p >> versus >> -P, respectively? >> > > -S and -P turn on sampling. -S does 'whole system' sampling. -P is > process specific (i.e., the counters only count when the target > process(es) > are running). > > So: > > # pmcstat -S instructions -O /tmp/foo.out > > will collect samples. > > # pmcstat -g -R /tmp/foo.out > > will convert the sample log to gprof(1) compatible 'gmon.out' files. > > Sampling on the AMD64 requires a patch to current [I'll commit it > shortly]. Is sampling supposed to work on i386? Because it doesn't seem to collect anything. Counting works fine, on the other hand. # pmcstat -P instructions -O sample.out -d fsck_ffs /usr > /dev/null & [1] + done pmcstat -P instructions -O sample.out -d fsck_ffs / usr > /dev/null # pmcstat -R sample.out -g # ls k7-retired-instructions # -- Suleiman Souhlal | ssouhlal@vt.edu The FreeBSD Project | ssouhlal@FreeBSD.org