From owner-freebsd-bugs@FreeBSD.ORG Sun Jun 23 01:10:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 75F82DF2 for ; Sun, 23 Jun 2013 01:10: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 4C5E81773 for ; Sun, 23 Jun 2013 01:10: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 r5N1A1cD050748 for ; Sun, 23 Jun 2013 01:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r5N1A0eM050747; Sun, 23 Jun 2013 01:10:00 GMT (envelope-from gnats) Date: Sun, 23 Jun 2013 01:10:00 GMT Message-Id: <201306230110.r5N1A0eM050747@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: hiren panchasara 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: hiren panchasara List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jun 2013 01:10:01 -0000 The following reply was made to PR kern/179827; it has been noted by GNATS. From: hiren panchasara To: Adrian Chadd 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 18:05:13 -0700 On Sat, Jun 22, 2013 at 1:23 PM, Adrian Chadd wrote: > Right. Do that but with the test running in another window, so you > don't get the message overlap. Here is how it looks: # p/instructions 293898819 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 0 # p/instructions 201677536862 > > 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. Precisely how it looks. Thanks for the explanation. cheers, Hiren