Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 2013 18:44:05 -0700
From:      hiren panchasara <hiren.panchasara@gmail.com>
To:        freebsd-bugs@freebsd.org, Adrian Chadd <adrian@freebsd.org>
Subject:   Re: kern/179827: [hwpmc] process-mode counters aren&#39;t correctly read on multi-core machines
Message-ID:  <CALCpEUGDyhbvjfxeQB7v3mUpeS1NvkcmED53ciWbEzavHjswow@mail.gmail.com>
In-Reply-To: <201306230110.r5N1A0eM050747@freefall.freebsd.org>
References:  <201306230110.r5N1A0eM050747@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 22, 2013 at 6:10 PM, hiren panchasara
<hiren.panchasara@gmail.com> wrote:
> 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&#39;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

Providing just another dataset:

I disabled all the core on my multicore box but one.

Here is how it looks now:

-bash-4.2$ sysctl hw.ncpu
hw.ncpu: 1
-bash-4.2$ sysctl -a | grep cpus
kern.sched.cpusetsize: 8
kern.smp.maxcpus: 64
kern.smp.cpus: 1
security.jail.param.cpuset.id: 0
-bash-4.2$ sudo kldload hwpmc
Password:
-bash-4.2$  pmcstat -p instructions -w 1 ./sin
#  p/instructions
       2567003908
       4788889883
       4789172557
       4831975398
       4849956205
       4851329559
       4851406017
       4856042101
       4845150406
       4851375670
       4846480686
       4856350074
       4787874591
       4788928556
       4807915946
       4846906338
       4855030753
       4788894220
       4789462823
       4789545686
       4787800623
       4788810934
       4787603979
       4788655804
       4950398350
       4846598212
       4856078443
       4846884249
       4855005835
       4789023855
       4788797097
       4808609474
       4845368074
       4856301796
       4846450942
       4789188889
       4787951904
       4813144473
       4850887893
       4846470359
       4787946181
       4788896164
       1599707791
-bash-4.2$

Supporting Adrian's observations.

cheers,
Hiren



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUGDyhbvjfxeQB7v3mUpeS1NvkcmED53ciWbEzavHjswow>