Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-03 Thread Arnaldo Carvalho de Melo
Em Fri, Apr 03, 2015 at 01:11:47PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Apr 02, 2015 at 01:59:34PM +0200, Peter Zijlstra escreveu: > > On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: > > > But personally I think the "include" approach is too ugly. I would just > > >

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-03 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 02, 2015 at 01:59:34PM +0200, Peter Zijlstra escreveu: > On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: > > But personally I think the "include" approach is too ugly. I would just > > add a function instead. Something like: > > You've not stared at the kernel

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-03 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 02, 2015 at 01:59:34PM +0200, Peter Zijlstra escreveu: On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: But personally I think the include approach is too ugly. I would just add a function instead. Something like: You've not stared at the kernel tracepoint code

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-03 Thread Arnaldo Carvalho de Melo
Em Fri, Apr 03, 2015 at 01:11:47PM -0300, Arnaldo Carvalho de Melo escreveu: Em Thu, Apr 02, 2015 at 01:59:34PM +0200, Peter Zijlstra escreveu: On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: But personally I think the include approach is too ugly. I would just add a

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 02, 2015 at 10:12:50AM +0200, Ingo Molnar escreveu: > * Peter Zijlstra wrote: > > tools/perf/util/print_helper.h |7 + > > 6 files changed, 170 insertions(+), 174 deletions(-) > > Acked-by: Ingo Molnar I'll get this in tomorrow, just finishing a pull req now, - Arnaldo -- To

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Adrian Hunter
On 02/04/15 14:59, Peter Zijlstra wrote: > On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: >> But personally I think the "include" approach is too ugly. I would just >> add a function instead. Something like: > > You've not stared at the kernel tracepoint code long enough ;-) I

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Peter Zijlstra
On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: > But personally I think the "include" approach is too ugly. I would just > add a function instead. Something like: You've not stared at the kernel tracepoint code long enough ;-) Something like so then? --- Subject: perf, tools:

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Jiri Olsa
On Wed, Apr 01, 2015 at 06:26:38PM +0200, Peter Zijlstra wrote: SNIP > - ret += PRINT_ATTR_U32(wakeup_events); > - ret += PRINT_ATTR_U32(wakeup_watermark); > - ret += PRINT_ATTR_X32(bp_type); > - ret += PRINT_ATTR_X64(bp_addr); > - ret += PRINT_ATTR_X64(config1); > - ret

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Adrian Hunter
On 01/04/15 19:52, Jiri Olsa wrote: > On Wed, Apr 01, 2015 at 06:26:38PM +0200, Peter Zijlstra wrote: >> >> With some feedback from Jolsa, who showed me how to trigger the actual >> outputs. > > adding Adrian to CC as he's the original author AFAIK I wanted a compact format, and the omission of

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Ingo Molnar
* Peter Zijlstra wrote: > With some feedback from Jolsa, who showed me how to trigger the actual > outputs. > > --- > > Subject: perf, tools: Merge all perf_event_attr print functions > From: Peter Zijlstra > Date: Tue Mar 31 13:01:54 CEST 2015 > > Currently there's 3 (that I found)

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: With some feedback from Jolsa, who showed me how to trigger the actual outputs. --- Subject: perf, tools: Merge all perf_event_attr print functions From: Peter Zijlstra pet...@infradead.org Date: Tue Mar 31 13:01:54 CEST 2015 Currently

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Adrian Hunter
On 01/04/15 19:52, Jiri Olsa wrote: On Wed, Apr 01, 2015 at 06:26:38PM +0200, Peter Zijlstra wrote: With some feedback from Jolsa, who showed me how to trigger the actual outputs. adding Adrian to CC as he's the original author AFAIK I wanted a compact format, and the omission of null/zero

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Jiri Olsa
On Wed, Apr 01, 2015 at 06:26:38PM +0200, Peter Zijlstra wrote: SNIP - ret += PRINT_ATTR_U32(wakeup_events); - ret += PRINT_ATTR_U32(wakeup_watermark); - ret += PRINT_ATTR_X32(bp_type); - ret += PRINT_ATTR_X64(bp_addr); - ret += PRINT_ATTR_X64(config1); - ret +=

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 02, 2015 at 10:12:50AM +0200, Ingo Molnar escreveu: * Peter Zijlstra pet...@infradead.org wrote: tools/perf/util/print_helper.h |7 + 6 files changed, 170 insertions(+), 174 deletions(-) Acked-by: Ingo Molnar mi...@kernel.org I'll get this in tomorrow, just finishing a

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Peter Zijlstra
On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: But personally I think the include approach is too ugly. I would just add a function instead. Something like: You've not stared at the kernel tracepoint code long enough ;-) Something like so then? --- Subject: perf, tools: Merge

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-02 Thread Adrian Hunter
On 02/04/15 14:59, Peter Zijlstra wrote: On Thu, Apr 02, 2015 at 12:01:53PM +0300, Adrian Hunter wrote: But personally I think the include approach is too ugly. I would just add a function instead. Something like: You've not stared at the kernel tracepoint code long enough ;-) I will try

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-01 Thread Jiri Olsa
On Wed, Apr 01, 2015 at 06:26:38PM +0200, Peter Zijlstra wrote: > > With some feedback from Jolsa, who showed me how to trigger the actual > outputs. adding Adrian to CC as he's the original author AFAIK jirka > > --- > > Subject: perf, tools: Merge all perf_event_attr print functions >

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-01 Thread Peter Zijlstra
With some feedback from Jolsa, who showed me how to trigger the actual outputs. --- Subject: perf, tools: Merge all perf_event_attr print functions From: Peter Zijlstra Date: Tue Mar 31 13:01:54 CEST 2015 Currently there's 3 (that I found) different and incomplete implementations of printing

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-01 Thread Peter Zijlstra
With some feedback from Jolsa, who showed me how to trigger the actual outputs. --- Subject: perf, tools: Merge all perf_event_attr print functions From: Peter Zijlstra pet...@infradead.org Date: Tue Mar 31 13:01:54 CEST 2015 Currently there's 3 (that I found) different and incomplete

Re: [RFC][PATCH] perf tools: unify perf_event_attr printing

2015-04-01 Thread Jiri Olsa
On Wed, Apr 01, 2015 at 06:26:38PM +0200, Peter Zijlstra wrote: With some feedback from Jolsa, who showed me how to trigger the actual outputs. adding Adrian to CC as he's the original author AFAIK jirka --- Subject: perf, tools: Merge all perf_event_attr print functions From: Peter

[RFC][PATCH] perf tools: unify perf_event_attr printing

2015-03-31 Thread Peter Zijlstra
On Tue, Mar 31, 2015 at 10:19:55AM +0200, Peter Zijlstra wrote: > Fwiw, having 3 incomplete ways to print perf_event_attr() is > disgusting. How about something like so? Its not identical, but at least its complete and consistent. --- tools/perf/util/print_attr.h | 69 +++

[RFC][PATCH] perf tools: unify perf_event_attr printing

2015-03-31 Thread Peter Zijlstra
On Tue, Mar 31, 2015 at 10:19:55AM +0200, Peter Zijlstra wrote: Fwiw, having 3 incomplete ways to print perf_event_attr() is disgusting. How about something like so? Its not identical, but at least its complete and consistent. --- tools/perf/util/print_attr.h | 69 +++