From owner-freebsd-bugs@FreeBSD.ORG Sat Jun 22 19:21:27 2013 Return-Path: Delivered-To: freebsd-bugs@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 4C5937C5; Sat, 22 Jun 2013 19:21:27 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x22d.google.com (mail-ee0-x22d.google.com [IPv6:2a00:1450:4013:c00::22d]) by mx1.freebsd.org (Postfix) with ESMTP id B3C4E1A41; Sat, 22 Jun 2013 19:21:26 +0000 (UTC) Received: by mail-ee0-f45.google.com with SMTP id c1so5238577eek.4 for ; Sat, 22 Jun 2013 12:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=G0LhCxPuc+QDi9E0tYwtT8UNnLg+86st85e2C9SInVY=; b=vQMou2y3HSo3TFPtQIVJMmT+zc7fm7r8i0n6RNcMa0wrvOhW5peRgirQUwc0sTHbDc JBtaBgCi+mGpXB5jHb5xsLZCnA46cD8f9DsxArKwulYVXfuYaK+blDAjQy1oSBOQFxY4 thMdXu1XjhA1+KpLlN0nsOSJ+C321LrTDCzJmcdwh7nksakMGgZElObCIUuh0HYcaYCn xKy3ladR5B1zCtvPQdnlt+dRLVvRupAEMur2OXjmS4H3Jms0jXVAq2NMAcxL6YOZpAsO YUylLCRPO3VjCNCh78M9SdxQ7zxUhl9FDvfhlq1Sepr3m/J69+dT7Zo5bwbN7He+Qi7L HIaA== MIME-Version: 1.0 X-Received: by 10.14.48.77 with SMTP id u53mr17092392eeb.154.1371928885856; Sat, 22 Jun 2013 12:21:25 -0700 (PDT) Received: by 10.14.119.203 with HTTP; Sat, 22 Jun 2013 12:21:25 -0700 (PDT) In-Reply-To: <201306221710.r5MHA1aq048745@freefall.freebsd.org> References: <201306221710.r5MHA1aq048745@freefall.freebsd.org> Date: Sat, 22 Jun 2013 12:21:25 -0700 Message-ID: Subject: Re: kern/179827: [hwpmc] process-mode counters aren't correctly read on multi-core machines From: hiren panchasara To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: freebsd-bugs@freebsd.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 19:21:27 -0000 On Sat, Jun 22, 2013 at 10:10 AM, Adrian Chadd wrote: > 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 10:03:46 -0700 > > You can't do sleep() ; that yields the CPU. > > Replace it with a busy loop that constantly does some math. Okay, so some random thing off of internet: int main() { float a , b , sq , sinx , cosx , tanx; int x = 4; int y=30; for (int i=0; i old d5ed45d 22431855CSW7 :SWO:1: cpu=9 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=9 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=9 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=9 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=23 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=23 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=23 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=23 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=23 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=23 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW:SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW:SWO:1: cpu=4 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 0 P# p/instructionMC:s OPS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW:SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW:SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:Os PS:1: rw id=-16579051 flags=0x20 PMC:OPS:2: rw id=21 -> old d5ed45d CSW0 :SWO:1: cpu=18 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0 PMC# p/instruction:OPs S:1: rw id=-16579051 flags=0x20 CSW:SWO:1: cpu=20 proc=0xfffffe0047f504b8 (16889, sin) pp=0 PMC:OPS:2: rw id=21 -> old 2f0d3df576 20186130869PM7 C:OPS:1: stop pmc=0xfffffe02e8fd6300 mode=3 ri=21 CSW:SWO:1: cpu=7 proc=0xfffffe0047d58000 (16888, pmcstat) pp=0