[PATCH V4 5/6] docs: ABI: sysfs-bus-event_source-devices-htm: Document sysfs event format entries for htm pmu
From: Athira Rajeev <hidden>
Date: 2026-07-29 12:38:31
Also in:
linux-perf-users
Subsystem:
the rest · Maintainer:
Linus Torvalds
Add ABI documentation for the sysfs entries exposed by the "htm" PMU under /sys/bus/event_source/devices/htm/. Document the format attribute group, which describes the bit layout of perf_event_attr.config accepted by the htm PMU: event config bits 0-27 (composite: all fields combined) htm_type config bits 0-3 (HTM_CORE=2, HTM_NEST=1) nodeindex config bits 4-11 nodalchipindex config bits 12-19 coreindexonchip config bits 20-27 Document the events attribute group, which provides named aliases for the two supported HTM event types. Users can pass these names directly to perf: # perf record -e htm/htm_core/ ... # perf record -e htm/htm_nest/ ... Signed-off-by: Athira Rajeev <redacted> --- Changes in V3: - Fixed the format/ attribute table: the doc listed only the composite 'event' attribute (config:0-27) but omitted the four individual format attributes (htm_type, nodeindex, nodalchipindex, coreindexonchip) that the commit message described and the driver exposes. Added all four with their correct bit ranges and a 'For example::' block showing htm_core and htm_nest mappings. - Fixed the events/ example in the commit message: the previous example used format-group key=value syntax (htm/nodalchipindex=2,nodeindex=0,htm_type=1/) which conflates the format group with the events group. The events group provides named aliases; the correct examples are 'htm/htm_core/' and 'htm/htm_nest/'. - Fixed grammar: "Supported attribute are" -> "Supported attributes are". Changes in V2: - Updated the bit-range descriptions to match the V2 config layout: htm_type is bits 0-3 (was listed inconsistently in V1), nodeindex is bits 4:11, nodalchipindex is bits 12:19, coreindexonchip is bits 20-27. - Added documentation for the events/ sysfs group which lists named events users can pass directly to perf. This group was not documented in V1. - Patch is now 5/6 instead of 4/5. .../sysfs-bus-event_source-devices-htm | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-htm
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-htm b/Documentation/ABI/testing/sysfs-bus-event_source-devices-htm
new file mode 100644
index 000000000000..1c3e17cb124c
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-htm@@ -0,0 +1,34 @@ +What: /sys/bus/event_source/devices/htm/format +Date: June 2026 +Contact: Linux on PowerPC Developer List <linuxppc-dev at lists.ozlabs.org> +Description: Read-only. Attribute group to describe the magic bits + that go into perf_event_attr.config for a particular pmu. + (See ABI/testing/sysfs-bus-event_source-devices-format). + + Each attribute under this group defines a bit range of the + perf_event_attr.config. Supported attributes are listed + below:: + + event = "config:0-27" - composite event ID + htm_type = "config:0-3" - HTM type (HTM_CORE=2, HTM_NEST=1) + nodeindex = "config:4-11" - node index + nodalchipindex = "config:12-19" - nodal chip index + coreindexonchip = "config:20-27" - core index on chip + + For example:: + + htm_core = "htm_type=2" + htm_nest = "htm_type=1" + +What: /sys/bus/event_source/devices/htm/events +Date: June 2026 +Contact: Linux on PowerPC Developer List <linuxppc-dev at lists.ozlabs.org> +Description: Read-only. Attribute group to describe performance monitoring + events for the Hardware Trace Macro (HTM) trace. Each attribute + in this group describes a single performance monitoring event + supported by htm pmu. The name of the file is the name of + the event (See ABI/testing/sysfs-bus-event_source-devices-events). + + For example:: + # perf record -e htm/htm_core/ + # perf record -e htm/htm_nest/
--
2.43.0