Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-06-11 Thread Andi Kleen
On Fri, Jun 09, 2017 at 11:13:11AM +0200, Milian Wolff wrote: > > > But I cannot do: > > > > > > $ perf record -e "topdown-*" ls > > > event syntax error: 'topdown-*' > > > > That's actually good because the current topdown events are not useful to > > sample > > Can you elaborate? I assume it's

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-06-09 Thread Milian Wolff
On Freitag, 9. Juni 2017 04:52:43 CEST Andi Kleen wrote: > On Thu, Jun 08, 2017 at 02:59:58PM +0200, Milian Wolff wrote: > > But I notice that this functionality is missing in other places too. Most > > notably, I would like to be able to configure `perf stat` in a similar > > way. > > Such that on

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-06-08 Thread Andi Kleen
On Thu, Jun 08, 2017 at 02:59:58PM +0200, Milian Wolff wrote: > But I notice that this functionality is missing in other places too. Most > notably, I would like to be able to configure `perf stat` in a similar way. > Such that one could do: > > perf stat -e +cache-misses > > Instead of > > pe

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-06-08 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 02, 2017 at 08:48:10AM -0700, Andi Kleen escreveu: > From: Andi Kleen > > With perf script it is common that we just want to add or remove a field. > Currently this requires figuring out the long list of default fields and > specifying them first, and then adding/removing the new fiel

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-06-08 Thread Milian Wolff
On Friday, June 2, 2017 5:48:10 PM CEST Andi Kleen wrote: > From: Andi Kleen > > With perf script it is common that we just want to add or remove a field. > Currently this requires figuring out the long list of default fields and > specifying them first, and then adding/removing the new field. >

[PATCH] perf, tools, script: Allow adding and removing fields

2017-06-02 Thread Andi Kleen
From: Andi Kleen With perf script it is common that we just want to add or remove a field. Currently this requires figuring out the long list of default fields and specifying them first, and then adding/removing the new field. This patch adds a new + - syntax to merely add or remove fields, that

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-09 Thread Jiri Olsa
On Tue, May 09, 2017 at 07:36:37AM -0700, Andi Kleen wrote: SNIP > + } else { > + if (change == REMOVE) > + output[j].fields &= > ~all_output_options[i].field; > +

[PATCH] perf, tools, script: Allow adding and removing fields

2017-05-09 Thread Andi Kleen
From: Andi Kleen With perf script it is common that we just want to add or remove a field. Currently this requires figuring out the long list of default fields and specifying them first, and then adding/removing the new field. This patch adds a new + - syntax to merely add or remove fields, that

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-09 Thread Andi Kleen
On Tue, May 09, 2017 at 03:45:03PM +0200, Jiri Olsa wrote: > On Tue, May 09, 2017 at 05:29:24AM -0700, Andi Kleen wrote: > > > so the -F option for 'type:' does not have default set, > > > and it looks like the +- don't make sense there: > > > > hw:+comm is just equivalent to hw:comm > > > > Seem

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-09 Thread Jiri Olsa
On Tue, May 09, 2017 at 05:29:24AM -0700, Andi Kleen wrote: > > so the -F option for 'type:' does not have default set, > > and it looks like the +- don't make sense there: > > hw:+comm is just equivalent to hw:comm > > Seems fine to me? > > hw:-comm won't do anything, but I guess that's expecte

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-09 Thread Andi Kleen
> so the -F option for 'type:' does not have default set, > and it looks like the +- don't make sense there: hw:+comm is just equivalent to hw:comm Seems fine to me? hw:-comm won't do anything, but I guess that's expected. Don't see any need to change this? > > [jolsa@krava perf]$ ./perf scri

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-09 Thread Jiri Olsa
On Mon, May 08, 2017 at 09:21:34AM -0700, Andi Kleen wrote: > From: Andi Kleen > > With perf script it is common that we just want to add or remove a field. > Currently this requires figuring out the long list of default fields and > specifying them first, and then adding/removing the new field.

[PATCH] perf, tools, script: Allow adding and removing fields

2017-05-08 Thread Andi Kleen
From: Andi Kleen With perf script it is common that we just want to add or remove a field. Currently this requires figuring out the long list of default fields and specifying them first, and then adding/removing the new field. This patch adds a new + - syntax to merely add or remove fields, that

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-07 Thread Jiri Olsa
On Fri, May 05, 2017 at 12:43:40PM -0700, Andi Kleen wrote: > On Fri, May 05, 2017 at 09:57:54AM +0200, Jiri Olsa wrote: > > On Thu, May 04, 2017 at 03:26:20PM -0700, Andi Kleen wrote: > > > On Tue, May 02, 2017 at 08:41:47AM +0200, Jiri Olsa wrote: > > > > On Mon, May 01, 2017 at 12:47:46PM -0700,

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-05 Thread Andi Kleen
On Fri, May 05, 2017 at 09:57:54AM +0200, Jiri Olsa wrote: > On Thu, May 04, 2017 at 03:26:20PM -0700, Andi Kleen wrote: > > On Tue, May 02, 2017 at 08:41:47AM +0200, Jiri Olsa wrote: > > > On Mon, May 01, 2017 at 12:47:46PM -0700, Andi Kleen wrote: > > > > From: Andi Kleen > > > > > > > > With p

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-05 Thread Jiri Olsa
On Thu, May 04, 2017 at 03:26:20PM -0700, Andi Kleen wrote: > On Tue, May 02, 2017 at 08:41:47AM +0200, Jiri Olsa wrote: > > On Mon, May 01, 2017 at 12:47:46PM -0700, Andi Kleen wrote: > > > From: Andi Kleen > > > > > > With perf script it is common that we just want to add or remove a field. > >

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-04 Thread Andi Kleen
On Tue, May 02, 2017 at 08:41:47AM +0200, Jiri Olsa wrote: > On Mon, May 01, 2017 at 12:47:46PM -0700, Andi Kleen wrote: > > From: Andi Kleen > > > > With perf script it is common that we just want to add or remove a field. > > Currently this requires figuring out the long list of default fields

Re: [PATCH] perf, tools, script: Allow adding and removing fields

2017-05-01 Thread Jiri Olsa
On Mon, May 01, 2017 at 12:47:46PM -0700, Andi Kleen wrote: > From: Andi Kleen > > With perf script it is common that we just want to add or remove a field. > Currently this requires figuring out the long list of default fields and > specifying them first, and then adding/removing the new field.

[PATCH] perf, tools, script: Allow adding and removing fields

2017-05-01 Thread Andi Kleen
From: Andi Kleen With perf script it is common that we just want to add or remove a field. Currently this requires figuring out the long list of default fields and specifying them first, and then adding/removing the new field. This patch adds a new + - syntax to merely add or remove fields, that