kern/179827: [hwpmc] process-mode counters aren't correctly read on multi-core machines
hiren panchasara
hiren.panchasara at gmail.com
Mon Jun 24 01:44:07 UTC 2013
On Sat, Jun 22, 2013 at 6:10 PM, hiren panchasara
<hiren.panchasara at gmail.com> wrote:
> The following reply was made to PR kern/179827; it has been noted by GNATS.
>
> From: hiren panchasara <hiren.panchasara at gmail.com>
> To: Adrian Chadd <adrian at freebsd.org>
> Cc: bug-followup at 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 at 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
More information about the freebsd-bugs
mailing list