public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH] perf: Expand definition of sysfs format attribute
@ 2013-03-04  4:21 Michael Ellerman
  2013-04-08  7:24 ` Michael Ellerman
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Michael Ellerman @ 2013-03-04  4:21 UTC (permalink / raw)
  To: acme; +Cc: peterz, jolsa, linux-kernel, linux-doc, rob

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 <michael@ellerman.id.au>
---
 Documentation/ABI/testing/sysfs-bus-event_source-devices-format |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
index 079afc7..77f47ff 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
@@ -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.
-- 
1.7.10.4


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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-03-04  4:21 [RFC/PATCH] perf: Expand definition of sysfs format attribute Michael Ellerman
@ 2013-04-08  7:24 ` Michael Ellerman
  2013-05-06  1:08   ` Michael Ellerman
  2013-04-08  9:05 ` Peter Zijlstra
  2013-05-10 15:27 ` Peter Zijlstra
  2 siblings, 1 reply; 9+ messages in thread
From: Michael Ellerman @ 2013-04-08  7:24 UTC (permalink / raw)
  To: acme; +Cc: peterz, jolsa, linux-kernel, linux-doc, rob

On Mon, Mar 04, 2013 at 03:21:05PM +1100, Michael Ellerman wrote:
> 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.

Any comments on this one?

cheers

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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-03-04  4:21 [RFC/PATCH] perf: Expand definition of sysfs format attribute Michael Ellerman
  2013-04-08  7:24 ` Michael Ellerman
@ 2013-04-08  9:05 ` Peter Zijlstra
  2013-04-08 11:57   ` Michael Ellerman
  2013-05-10 15:27 ` Peter Zijlstra
  2 siblings, 1 reply; 9+ messages in thread
From: Peter Zijlstra @ 2013-04-08  9:05 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: acme, jolsa, linux-kernel, linux-doc, rob

On Mon, 2013-03-04 at 15:21 +1100, Michael Ellerman wrote:
> 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 <michael@ellerman.id.au>
> ---
>  Documentation/ABI/testing/sysfs-bus-event_source-devices-format |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> index 079afc7..77f47ff 100644
> --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> @@ -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.

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.


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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-04-08  9:05 ` Peter Zijlstra
@ 2013-04-08 11:57   ` Michael Ellerman
  2013-04-08 15:51     ` Jiri Olsa
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Ellerman @ 2013-04-08 11:57 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: acme, jolsa, linux-kernel, linux-doc, rob

On Mon, Apr 08, 2013 at 11:05:15AM +0200, Peter Zijlstra wrote:
> On Mon, 2013-03-04 at 15:21 +1100, Michael Ellerman wrote:
> > 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 <michael@ellerman.id.au>
> > ---
> >  Documentation/ABI/testing/sysfs-bus-event_source-devices-format |    6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> > index 079afc7..77f47ff 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> > +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> > @@ -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.
> 
> 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.

> 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

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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-04-08 11:57   ` Michael Ellerman
@ 2013-04-08 15:51     ` Jiri Olsa
  0 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2013-04-08 15:51 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: Peter Zijlstra, acme, linux-kernel, linux-doc, rob

On Mon, Apr 08, 2013 at 09:57:50PM +1000, Michael Ellerman wrote:

SNIP

> > 
> > 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.
> 
> > 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

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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-04-08  7:24 ` Michael Ellerman
@ 2013-05-06  1:08   ` Michael Ellerman
  2013-05-06  8:20     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Ellerman @ 2013-05-06  1:08 UTC (permalink / raw)
  To: acme; +Cc: peterz, jolsa, linux-kernel, linux-doc, rob

On Mon, Apr 08, 2013 at 05:24:22PM +1000, Michael Ellerman wrote:
> On Mon, Mar 04, 2013 at 03:21:05PM +1100, Michael Ellerman wrote:
> > 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.
> 
> 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

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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-05-06  1:08   ` Michael Ellerman
@ 2013-05-06  8:20     ` Arnaldo Carvalho de Melo
  2013-05-06 11:36       ` Jiri Olsa
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-05-06  8:20 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: peterz, jolsa, linux-kernel, linux-doc, rob

Em Mon, May 06, 2013 at 11:08:30AM +1000, Michael Ellerman escreveu:
> On Mon, Apr 08, 2013 at 05:24:22PM +1000, Michael Ellerman wrote:
> > On Mon, Mar 04, 2013 at 03:21:05PM +1100, Michael Ellerman wrote:
> > > 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.
> > 
> > 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

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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-05-06  8:20     ` Arnaldo Carvalho de Melo
@ 2013-05-06 11:36       ` Jiri Olsa
  0 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2013-05-06 11:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Michael Ellerman, peterz, linux-kernel, linux-doc, rob

On Mon, May 06, 2013 at 05:20:08AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, May 06, 2013 at 11:08:30AM +1000, Michael Ellerman escreveu:
> > On Mon, Apr 08, 2013 at 05:24:22PM +1000, Michael Ellerman wrote:
> > > On Mon, Mar 04, 2013 at 03:21:05PM +1100, Michael Ellerman wrote:
> > > > 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.
> > > 
> > > 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

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

* Re: [RFC/PATCH] perf: Expand definition of sysfs format attribute
  2013-03-04  4:21 [RFC/PATCH] perf: Expand definition of sysfs format attribute Michael Ellerman
  2013-04-08  7:24 ` Michael Ellerman
  2013-04-08  9:05 ` Peter Zijlstra
@ 2013-05-10 15:27 ` Peter Zijlstra
  2 siblings, 0 replies; 9+ messages in thread
From: Peter Zijlstra @ 2013-05-10 15:27 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: acme, jolsa, linux-kernel, linux-doc, rob

On Mon, Mar 04, 2013 at 03:21:05PM +1100, Michael Ellerman wrote:
> 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 <michael@ellerman.id.au>

Jiri was going to collect to send to Ingo..

Acked-by: Peter Zijlstra <peterz@infradead.org>

> ---
>  Documentation/ABI/testing/sysfs-bus-event_source-devices-format |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> index 079afc7..77f47ff 100644
> --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
> @@ -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.
> -- 
> 1.7.10.4
> 

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

end of thread, other threads:[~2013-05-10 15:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04  4:21 [RFC/PATCH] perf: Expand definition of sysfs format attribute Michael Ellerman
2013-04-08  7:24 ` Michael Ellerman
2013-05-06  1:08   ` Michael Ellerman
2013-05-06  8:20     ` Arnaldo Carvalho de Melo
2013-05-06 11:36       ` Jiri Olsa
2013-04-08  9:05 ` Peter Zijlstra
2013-04-08 11:57   ` Michael Ellerman
2013-04-08 15:51     ` Jiri Olsa
2013-05-10 15:27 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox