Skip to contentSkip to conversation

perf: Expand definition of sysfs format attribute

PATCH New Jiri Olsa 2 participants 2 messages May 10, 2013 – May 31, 2013

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

PATCH 1/1 perf: Expand definition of sysfs format attribute

From: Michael Ellerman <[email protected]>

Make it explicit that the format attributes may define overlapping bit ranges. Unfortunately this was left unspecified originally, and all the examples show non-overlapping ranges. I don't believe this is an ABI change, as we are defining something that was previously undefined, but others may disagree.

The POWER8 PMU would like to define overlapping ranges, as bit ranges in the event code have different meanings for certain events. It will also allow us to define an overarching "event" field, that encompasses all others.

As far as I can see perf is comfortable with this change, however I am not sure if there are any other users of the interface.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Michael Ellerman <[email protected]>
---
 Documentation/ABI/testing/sysfs-bus-event_source-devices-format | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/ABI/testing/sysfs-bus-event_source-devices-format +6 -0
index 079afc7..77f47ff 100644
@@ -9,6 +9,12 @@ Description:
 		we want to export, so that userspace can deal with sane
 		name/value pairs.
 
+		Userspace must be prepared for the possibility that attributes
+		define overlapping bit ranges. For example:
+			attr1 = 'config:0-23'
+			attr2 = 'config:0-7'
+			attr3 = 'config:12-35'
+
 		Example: 'config1:1,6-10,44'
 		Defines contents of attribute that occupies bits 1,6-10,44 of
 		perf_event_attr::config1.
Signature · 1 line
1.7.11.7
#1 lore raw
perf: Expand definition of sysfs format attribute
Commit-ID:  fd851780e61ac36e8d59fe87cca01a2e673930ff
Gitweb:     http://git.kernel.org/tip/fd851780e61ac36e8d59fe87cca01a2e673930ff
Author:     Michael Ellerman <[email protected]>
AuthorDate: Fri, 10 May 2013 17:33:00 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 29 May 2013 16:11:40 +0300

perf: Expand definition of sysfs format attribute

Make it explicit that the format attributes may define overlapping bit ranges. Unfortunately this was left unspecified originally, and all the examples show non-overlapping ranges. I don't believe this is an ABI change, as we are defining something that was previously undefined, but others may disagree.

The POWER8 PMU would like to define overlapping ranges, as bit ranges in the event code have different meanings for certain events. It will also allow us to define an overarching "event" field, that encompasses all others.

As far as I can see perf is comfortable with this change, however I am not sure if there are any other users of the interface.

---
 Documentation/ABI/testing/sysfs-bus-event_source-devices-format | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/ABI/testing/sysfs-bus-event_source-devices-format +6 -0
index 079afc7..77f47ff 100644
@@ -9,6 +9,12 @@ Description:
 		we want to export, so that userspace can deal with sane
 		name/value pairs.
 
+		Userspace must be prepared for the possibility that attributes
+		define overlapping bit ranges. For example:
+			attr1 = 'config:0-23'
+			attr2 = 'config:0-7'
+			attr3 = 'config:12-35'
+
 		Example: 'config1:1,6-10,44'
 		Defines contents of attribute that occupies bits 1,6-10,44 of
 		perf_event_attr::config1.