Home
last modified time | relevance | path

Searched hist:"498 d3486376befe4e82b5334d44bbc86b1982ee4" (Results 1 – 2 of 2) sorted by relevance

/linux/tools/perf/pmu-events/arch/x86/amdzen4/
H A Dcache.jsondiff 498d3486376befe4e82b5334d44bbc86b1982ee4 Fri Mar 01 09:44:31 CET 2024 Sandipan Das <sandipan.das@amd.com> perf vendor events amd: Fix Zen 4 cache latency events

L3PMCx0AC and L3PMCx0AD, used in l3_xi_sampled_latency* events, have a
quirk that requires them to be programmed with SliceId set to 0x3.
Without this, the events do not count at all and affects dependent
metrics such as l3_read_miss_latency.

If ThreadMask is not specified, the amd-uncore driver internally sets
ThreadMask to 0x3, EnAllCores to 0x1 and EnAllSlices to 0x1 but does
not set SliceId. Since SliceId must also be set to 0x3 in this case,
specify all the other fields explicitly.

E.g.

$ sudo perf stat -e l3_xi_sampled_latency.all,l3_xi_sampled_latency_requests.all -a sleep 1

Before:

Performance counter stats for 'system wide':

0 l3_xi_sampled_latency.all
0 l3_xi_sampled_latency_requests.all

1.005155399 seconds time elapsed

After:

Performance counter stats for 'system wide':

921,446 l3_xi_sampled_latency.all
54,210 l3_xi_sampled_latency_requests.all

1.005664472 seconds time elapsed

Fixes: 5b2ca349c313 ("perf vendor events amd: Add Zen 4 uncore events")
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: ananth.narayan@amd.com
Cc: ravi.bangoria@amd.com
Cc: eranian@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240301084431.646221-1-sandipan.das@amd.com
/linux/tools/perf/pmu-events/
H A Djevents.pydiff 498d3486376befe4e82b5334d44bbc86b1982ee4 Fri Mar 01 09:44:31 CET 2024 Sandipan Das <sandipan.das@amd.com> perf vendor events amd: Fix Zen 4 cache latency events

L3PMCx0AC and L3PMCx0AD, used in l3_xi_sampled_latency* events, have a
quirk that requires them to be programmed with SliceId set to 0x3.
Without this, the events do not count at all and affects dependent
metrics such as l3_read_miss_latency.

If ThreadMask is not specified, the amd-uncore driver internally sets
ThreadMask to 0x3, EnAllCores to 0x1 and EnAllSlices to 0x1 but does
not set SliceId. Since SliceId must also be set to 0x3 in this case,
specify all the other fields explicitly.

E.g.

$ sudo perf stat -e l3_xi_sampled_latency.all,l3_xi_sampled_latency_requests.all -a sleep 1

Before:

Performance counter stats for 'system wide':

0 l3_xi_sampled_latency.all
0 l3_xi_sampled_latency_requests.all

1.005155399 seconds time elapsed

After:

Performance counter stats for 'system wide':

921,446 l3_xi_sampled_latency.all
54,210 l3_xi_sampled_latency_requests.all

1.005664472 seconds time elapsed

Fixes: 5b2ca349c313 ("perf vendor events amd: Add Zen 4 uncore events")
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: ananth.narayan@amd.com
Cc: ravi.bangoria@amd.com
Cc: eranian@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240301084431.646221-1-sandipan.das@amd.com