Date: Sun, 23 Jun 2013 01:10:00 GMT From: hiren panchasara <hiren.panchasara@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/179827: [hwpmc] process-mode counters aren't correctly read on multi-core machines Message-ID: <201306230110.r5N1A0eM050747@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/179827; it has been noted by GNATS. From: hiren panchasara <hiren.panchasara@gmail.com> To: Adrian Chadd <adrian@freebsd.org> 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 <adrian@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306230110.r5N1A0eM050747>