From owner-freebsd-current@FreeBSD.ORG Sat May 20 22:34:59 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 9692D16A46F; Sat, 20 May 2006 22:34:59 +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 5139743D5D; Sat, 20 May 2006 22:34:59 +0000 (GMT) (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 041D746C13; Sat, 20 May 2006 18:34:59 -0400 (EDT) Date: Sat, 20 May 2006 23:34:58 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: jkoshy@FreeBSD.org Message-ID: <20060520233201.B8068@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@FreeBSD.org Subject: PMC enters debugger with NMI on ctrl-C 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: Sat, 20 May 2006 22:35:02 -0000 Got the following today while using PMC to sample a multi-process web server on an SMP Xeon box: tiger-2# ./httpd 80 /tmp/zero & [1] 769 tiger-2# tiger-2# tiger-2# pmcstat -S unhalted-cycles -O /tmp/sample.out ^CNMI ... going to debugger [thread pid 898 tid 100175 ] Stopped at p4_stop_pmc+0x70: movl $0,%eax db> bt Tracing pid 898 tid 100175 td 0xc765c360 p4_stop_pmc(0,1,1,0,0) at p4_stop_pmc+0x70 pmc_release_pmc_descriptor(c703ca00,c06c03f3,c1032860,c103cac8,e992fb18) at pmc_release_pmc_descriptor+0x61 pmc_syscall_handler(c765c360,e992fd04,2,202,c09c07d8) at pmc_syscall_handler+0xf6f syscall(3b,3b,bfbf003b,0,8050ee0) at syscall+0x2ee Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (210, FreeBSD ELF32, pmc_syscall_handler), eip = 0x280d104d, esp = 0xbfbfe6e0, ebp = 0xbfbfe6f8 --- db> I'll leave it in the debugger overnight in case there's anything useful to be done with it. BTW, saw some oddness. I capture the PMC samples on one box, and post-process on another. This results in the following oddness: I used the above pmcstat command to track unhalted-cycles on a Dual Xeon, then post-processed on an amd64 box, so pmcstat generated gmon output with the name p4-global-power-events. Perhaps pmcstat should capture the event name in its data file so that when doing later post-processing, it can use the names from the machine the captures were on, rather than the names of the machine the processing is being done on? Robert N M Watson