From owner-freebsd-bugs@FreeBSD.ORG Sat Jun 22 20:30:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 632748D4 for ; Sat, 22 Jun 2013 20:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 556911CA7 for ; Sat, 22 Jun 2013 20:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r5MKU1sZ088442 for ; Sat, 22 Jun 2013 20:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r5MKU15w088441; Sat, 22 Jun 2013 20:30:01 GMT (envelope-from gnats) Date: Sat, 22 Jun 2013 20:30:01 GMT Message-Id: <201306222030.r5MKU15w088441@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Adrian Chadd Subject: Re: kern/179827: [hwpmc] process-mode counters aren't correctly read on multi-core machines X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Adrian Chadd List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 20:30:01 -0000 The following reply was made to PR kern/179827; it has been noted by GNATS. From: Adrian Chadd To: hiren panchasara Cc: bug-followup@freebsd.org Subject: Re: kern/179827: [hwpmc] process-mode counters aren't correctly read on multi-core machines Date: Sat, 22 Jun 2013 13:23:24 -0700 Right. Do that but with the test running in another window, so you don't get the message overlap. THen look at how the results show lots of '0' from pmcstat, and then correlate that with the one-second "PMC,OPS" sample lines. See how whenever they're run whilst the process is running (ie, the last event was SWI) and it hasn't yet been de-scheduled. because it's still running, the saved counter is never updated with the PMC counter and subsequent reads (until it does get de-scheduled!) return the same cached value. Hence, lots of '0's, followed by a big, big counter value. adrian