lkml.org 
[lkml]   [2022]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 03/48] perf stat: Correct aggregation CPU map
From
Date
On 05/01/2022 06:13, Ian Rogers wrote:
> Switch the perf_cpu_map in aggr_update_shadow from
> the evlist to the counter's cpu map, so the index is appropriate. This
> addresses a problem where uncore counts, with a cpumap like:
> $ cat /sys/devices/uncore_imc_0/cpumask
> 0,18
> Don't aggregate counts in CPUs based on the index of those values in the
> cpumap (0 and 1) but on the actual CPU (0 and 18). Thereby correcting
> metric calculations in per-socket mode for counters without a full
> cpumask.
>
> On a SkylakeX with a tweaked DRAM_BW_Use metric, to remove unnecessary
> scaling, this gives:
>
> Before:
> $ /perf stat --per-socket -M DRAM_BW_Use -I 1000
> 1.001102293 S0 1 27.01 MiB uncore_imc/cas_count_write/ # 103.00 DRAM_BW_Use
> 1.001102293 S0 1 30.22 MiB uncore_imc/cas_count_read/
> 1.001102293 S0 1 1,001,102,293 ns duration_time
> 1.001102293 S1 1 20.10 MiB uncore_imc/cas_count_write/ # 0.00 DRAM_BW_Use
> 1.001102293 S1 1 32.74 MiB uncore_imc/cas_count_read/
> 1.001102293 S1 0 <not counted> ns duration_time
> 2.003517973 S0 1 83.04 MiB uncore_imc/cas_count_write/ # 920.00 DRAM_BW_Use
> 2.003517973 S0 1 145.95 MiB uncore_imc/cas_count_read/
> 2.003517973 S0 1 1,002,415,680 ns duration_time
> 2.003517973 S1 1 302.45 MiB uncore_imc/cas_count_write/ # 0.00 DRAM_BW_Use
> 2.003517973 S1 1 290.99 MiB uncore_imc/cas_count_read/
> 2.003517973 S1 0 <not counted> ns duration_time
>
> After:
> $ perf stat --per-socket -M DRAM_BW_Use -I 1000
> 1.001080840 S0 1 24.96 MiB uncore_imc/cas_count_write/ # 54.00 DRAM_BW_Use
> 1.001080840 S0 1 33.64 MiB uncore_imc/cas_count_read/
> 1.001080840 S0 1 1,001,080,840 ns duration_time
> 1.001080840 S1 1 42.43 MiB uncore_imc/cas_count_write/ # 84.00 DRAM_BW_Use
> 1.001080840 S1 1 47.05 MiB uncore_imc/cas_count_read/
> 1.001080840 S1 0 <not counted> ns duration_time
>
> Signed-off-by: Ian Rogers<irogers@google.com>

Tested-by: John Garry <john.garry@huawei.com>

\
 
 \ /
  Last update: 2022-01-10 19:45    [W:0.443 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site