From 518413d89ce498d35f6cb7104dd8c32f6e87a9aa Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 5 Jun 2024 21:49:59 -0700 Subject: [PATCH] perf Documentation: Describe the PMU naming convention It is an existing convention to use suffixes with PMU names. Try to capture that convention so that future PMU devices may adhere to it. The name of the file and date within the file try to follow existing conventions, particularly sysfs-bus-event_source-devices-events. Reviewed-by: James Clark Reviewed-by: Kan Liang Reviewed-by: Leo Yan Reviewed-by: Randy Dunlap Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: Bhaskara Budiredla Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Robin Murphy Cc: Stephane Eranian Cc: Thomas Richter Cc: Tuan Phan Cc: Will Deacon Link: https://lore.kernel.org/r/20240606044959.335715-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices b/Documentation/ABI/testing/sysfs-bus-event_source-devices new file mode 100644 index 000000000000..79b268319df1 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices @@ -0,0 +1,24 @@ +What: /sys/bus/event_source/devices/ +Date: 2014/02/24 +Contact: Linux kernel mailing list +Description: Performance Monitoring Unit () + + Each directory, for a PMU device, is a name + optionally followed by an underscore and then either a + decimal or hexadecimal number. For example, cpu is a + PMU name without a suffix as is intel_bts, + uncore_imc_0 is a PMU name with a 0 numeric suffix, + ddr_pmu_87e1b0000000 is a PMU name with a hex + suffix. The hex suffix must be more than two + characters long to avoid ambiguity with PMUs like the + S390 cpum_cf. + + Tools can treat PMUs with the same name that differ by + suffix as instances of the same PMU for the sake of, + for example, opening an event. For example, the PMUs + uncore_imc_free_running_0 and + uncore_imc_free_running_1 have an event data_read; + opening the data_read event on a PMU specified as + uncore_imc_free_running should be treated as opening + the data_read event on PMU uncore_imc_free_running_0 + and PMU uncore_imc_free_running_1. -- 2.25.1