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
@@ -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.10.4
Quoted 6 lines · Michael Ellerman
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.
Quoted 7 lines
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.
Any comments on this one?
cheers
Quoted 12 lines · Michael Ellerman
Quoted 11 lines · Michael Ellerman
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.
Quoted 4 lines
Quoted 2 lines
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.
Any comments on this one?
Hi Arnaldo,
I think the consensus from Peter and Jiri was that this was OK, are you happy to merge it?
cheers
Em Mon, May 06, 2013 at 11:08:30AM +1000, Michael Ellerman escreveu:
Quoted 13 lines · Michael Ellerman
Quoted 12 lines · Michael Ellerman
Quoted 11 lines
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.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
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.
Any comments on this one?
I think the consensus from Peter and Jiri was that this was OK, are you happy to merge it?
I'll do it eventually, but now I'm on vacations, so perhaps Jiri can process it and push to Ingo? Jiri?
- Arnaldo
Quoted 17 lines · Arnaldo Carvalho de Melo
Em Mon, May 06, 2013 at 11:08:30AM +1000, Michael Ellerman escreveu:
Quoted 16 lines · Michael Ellerman
Quoted 15 lines · Michael Ellerman
Quoted 13 lines
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.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Any comments on this one?
I think the consensus from Peter and Jiri was that this was OK, are you happy to merge it?
I'll do it eventually, but now I'm on vacations, so perhaps Jiri can process it and push to Ingo? Jiri?
ok, I'll try to do this soon ;)
jirka
Quoted 26 lines · Michael Ellerman
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.
Signed-off-by 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 +0
-0@@ -9,6 +9,12 @@ Description: we want to export, so that userspace can deal with sane name/value pairs.
Documentation/ABI/testing/sysfs-bus-event_source-devices-format Description: · line 20
Quoted 10 lines
Documentation/ABI/testing/sysfs-bus-event_source-devices-format +6
-0+ 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.
ISTR discussing this with Jiri at some point.. I think we ended up with being fine with overlapping ranges but having perf issue a warning (not an error) when attributes of a single event have overlap.
I'm not sure the latter was ever implemented in the userspace side.
Quoted 28 lines · Peter Zijlstra
Quoted 27 lines · Michael Ellerman
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.
Signed-off-by 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 +0
-0@@ -9,6 +9,12 @@ Description: we want to export, so that userspace can deal with sane name/value pairs.
Quoted 13 lines
Documentation/ABI/testing/sysfs-bus-event_source-devices-format Description: · line 20
Quoted 9 lines
Documentation/ABI/testing/sysfs-bus-event_source-devices-format +6
-0+ 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.ISTR discussing this with Jiri at some point.. I think we ended up with being fine with overlapping ranges but having perf issue a warning (not an error) when attributes of a single event have overlap.
OK great.
Quoted 1 line
I'm not sure the latter was ever implemented in the userspace side.
Yeah not that I can see with a quick look. It's fairly advanced usage IMHO so a warning would be nice, but not essential.
cheers
On Mon, Apr 08, 2013 at 09:57:50PM +1000, Michael Ellerman wrote:
SNIP
Quoted 11 lines
Quoted 4 lines
ISTR discussing this with Jiri at some point.. I think we ended up with being fine with overlapping ranges but having perf issue a warning (not an error) when attributes of a single event have overlap.
OK great.
Quoted 1 line
I'm not sure the latter was ever implemented in the userspace side.
Yeah not that I can see with a quick look. It's fairly advanced usage IMHO so a warning would be nice, but not essential.
oops, missed this email.. sry
it should be ok to overlap.. we don't check those ranges in perf tool now.. just take whatever is defined in format file
adding the warning to my todo list ;-)
jirka
Peter Zijlstra
Acked-byQuoted 11 lines · Michael Ellerman
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.
Quoted 4 lines
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.
Signed-off-by Michael Ellerman <[email protected]>
Jiri was going to collect to send to Ingo..
Quoted 24 lines
--- 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@@ -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.10.4