linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] perf/x86/amd: Add PerfMonV2 DF ehnancements
@ 2022-05-19 10:03 Sandipan Das
  2022-05-19 10:03 ` [PATCH 1/5] perf/x86/amd/uncore: Use dynamic events array Sandipan Das
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sandipan Das @ 2022-05-19 10:03 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, x86
  Cc: peterz, bp, acme, namhyung, jolsa, tglx, mingo, pbonzini,
	jmattson, like.xu.linux, eranian, ananth.narayan, ravi.bangoria,
	santosh.shukla, sandipan.das

Add support for using AMD Performance Monitoring Version 2
(PerfMonV2) features for Data Fabric (DF) events on Zen 4
processors. Utilize new CPUID leaf to detect PerfMonV2 and
determine the number of available PMCs. Also introduce the
new event encoding format and RDPMC mappings for accessing
additional DF counters.

E.g. larger metric groups which require more than 4 counters
could not be counted even on a Zen 4 platform that supports
16 DF counters. Only partial counting is possible by using
"--metric-no-group".

  $ sudo perf stat -M nps1_die_to_dram true

Before:

   Performance counter stats for 'system wide':

       <not counted>      dram_channel_data_controller_4                                     (0.00%)
       <not counted>      dram_channel_data_controller_1                                     (0.00%)
       <not counted>      dram_channel_data_controller_6                                     (0.00%)
       <not counted>      dram_channel_data_controller_3                                     (0.00%)
       <not counted>      dram_channel_data_controller_0                                     (0.00%)
       <not counted>      dram_channel_data_controller_5                                     (0.00%)
       <not counted>      dram_channel_data_controller_2                                     (0.00%)
       <not counted>      dram_channel_data_controller_7                                     (0.00%)
             886817 ns    duration_time

         0.000886817 seconds time elapsed

After:

   Performance counter stats for 'system wide':

                   0      dram_channel_data_controller_4 #      0.2 MiB  nps1_die_to_dram
                   0      dram_channel_data_controller_1
                   0      dram_channel_data_controller_6
                2838      dram_channel_data_controller_3
                   0      dram_channel_data_controller_0
                   0      dram_channel_data_controller_5
                   0      dram_channel_data_controller_2
                   0      dram_channel_data_controller_7
              896438 ns   duration_time

         0.000896438 seconds time elapsed

Sandipan Das (5):
  perf/x86/amd/uncore: Use dynamic events array
  perf/x86/amd/uncore: Use attr_update for format attributes
  perf/x86/amd/uncore: Detect available DF counters
  perf/x86/amd/uncore: Add PerfMonV2 DF event format
  perf/x86/amd/uncore: Add PerfMonV2 RDPMC assignments

 arch/x86/events/amd/uncore.c      | 146 ++++++++++++++++++++++++------
 arch/x86/include/asm/perf_event.h |  16 ++++
 2 files changed, 136 insertions(+), 26 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-19 10:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-19 10:03 [PATCH 0/5] perf/x86/amd: Add PerfMonV2 DF ehnancements Sandipan Das
2022-05-19 10:03 ` [PATCH 1/5] perf/x86/amd/uncore: Use dynamic events array Sandipan Das
2022-05-19 10:03 ` [PATCH 2/5] perf/x86/amd/uncore: Use attr_update for format attributes Sandipan Das
2022-05-19 10:03 ` [PATCH 3/5] perf/x86/amd/uncore: Detect available DF counters Sandipan Das
2022-05-19 10:03 ` [PATCH 4/5] perf/x86/amd/uncore: Add PerfMonV2 DF event format Sandipan Das
2022-05-19 10:03 ` [PATCH 5/5] perf/x86/amd/uncore: Add PerfMonV2 RDPMC assignments Sandipan Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).