mbox series

[trace-cmd,v2,0/3] trace-cmd filtering

Message ID 20230330185211.5604-1-krisman@suse.de (mailing list archive)
Headers show
Series trace-cmd filtering | expand

Message

Gabriel Krisman Bertazi March 30, 2023, 6:52 p.m. UTC
Hi Steve,

This implements my fix to restore single input filtering behavior
(bz217038) and adds support for global filters, as you requested.

On another topic, a current behavior that seems weird in my opinion is
that the following negates the second filter as well.

  "trace-cmd -i trace.dat.1 -v -F tp1 -i trace.dat.2 -F tp2"

I'd prefer that -v would apply only to the following -F. It'd allow me
to do:

  "trace-cmd -v -F 'mm_page_alloc' -i trace.dat.1 -i trace.dat.2 ... \
             -i trace.dat.10 -F 'mm_page_alloc:order==1'"

It obviously breaks the interface, so I didn't implement it here.  Would
like to hear your input, though.  We could have a new syntax:

  "trace-cmd ! -F tp1 -F tp2 ! -F tp3"

Thanks,

Gabriel Krisman Bertazi (3):
  trace-cmd report: Ensure filter is applied to single input file
  trace-cmd-report: Support global filters
  documentation: trace-cmd-report: Document filter scope

 .../trace-cmd/trace-cmd-report.1.txt          |  8 +++-
 tracecmd/trace-read.c                         | 45 ++++++++++++-------
 2 files changed, 34 insertions(+), 19 deletions(-)

Comments

Gabriel Krisman Bertazi May 6, 2023, 10:35 p.m. UTC | #1
Gabriel Krisman Bertazi <krisman@suse.de> writes:

> Hi Steve,

I wanted to ping you regarding this patchset.  Do you intend to take
this as-is?

Thanks!

>
> This implements my fix to restore single input filtering behavior
> (bz217038) and adds support for global filters, as you requested.
>
> On another topic, a current behavior that seems weird in my opinion is
> that the following negates the second filter as well.
>
>   "trace-cmd -i trace.dat.1 -v -F tp1 -i trace.dat.2 -F tp2"
>
> I'd prefer that -v would apply only to the following -F. It'd allow me
> to do:
>
>   "trace-cmd -v -F 'mm_page_alloc' -i trace.dat.1 -i trace.dat.2 ... \
>              -i trace.dat.10 -F 'mm_page_alloc:order==1'"
>
> It obviously breaks the interface, so I didn't implement it here.  Would
> like to hear your input, though.  We could have a new syntax:
>
>   "trace-cmd ! -F tp1 -F tp2 ! -F tp3"
>
> Thanks,
>
> Gabriel Krisman Bertazi (3):
>   trace-cmd report: Ensure filter is applied to single input file
>   trace-cmd-report: Support global filters
>   documentation: trace-cmd-report: Document filter scope
>
>  .../trace-cmd/trace-cmd-report.1.txt          |  8 +++-
>  tracecmd/trace-read.c                         | 45 ++++++++++++-------
>  2 files changed, 34 insertions(+), 19 deletions(-)
Steven Rostedt May 7, 2023, 1:51 a.m. UTC | #2
On Sat, 06 May 2023 18:35:34 -0400
Gabriel Krisman Bertazi <krisman@suse.de> wrote:

> Gabriel Krisman Bertazi <krisman@suse.de> writes:
> 
> > Hi Steve,  
> 
> I wanted to ping you regarding this patchset.  Do you intend to take
> this as-is?
> 

Apologies, I've been mostly focused on the kernel the last few weeks,
but as I'm giving a talk on the tracing libraries on Thursday, I'll be
focusing on them now ;-)

   https://ossna2023.sched.com/event/1K58e

So I'll reply in a few days.

-- Steve
Steven Rostedt May 30, 2023, 8:20 a.m. UTC | #3
On Thu, 30 Mar 2023 15:52:08 -0300
Gabriel Krisman Bertazi <krisman@suse.de> wrote:

> Hi Steve,

Hi Gabriel,

Sorry for taking so long. I finally got time to start looking at the
libtrace* trace-cmd code, and I queued this up for the next push.

Thanks Gabriel!

-- Steve


> 
> This implements my fix to restore single input filtering behavior
> (bz217038) and adds support for global filters, as you requested.
> 
> On another topic, a current behavior that seems weird in my opinion is
> that the following negates the second filter as well.
> 
>   "trace-cmd -i trace.dat.1 -v -F tp1 -i trace.dat.2 -F tp2"
> 
> I'd prefer that -v would apply only to the following -F. It'd allow me
> to do:
> 
>   "trace-cmd -v -F 'mm_page_alloc' -i trace.dat.1 -i trace.dat.2 ... \
>              -i trace.dat.10 -F 'mm_page_alloc:order==1'"
> 
> It obviously breaks the interface, so I didn't implement it here.  Would
> like to hear your input, though.  We could have a new syntax:
> 
>   "trace-cmd ! -F tp1 -F tp2 ! -F tp3"
> 
> Thanks,
> 
> Gabriel Krisman Bertazi (3):
>   trace-cmd report: Ensure filter is applied to single input file
>   trace-cmd-report: Support global filters
>   documentation: trace-cmd-report: Document filter scope
> 
>  .../trace-cmd/trace-cmd-report.1.txt          |  8 +++-
>  tracecmd/trace-read.c                         | 45 ++++++++++++-------
>  2 files changed, 34 insertions(+), 19 deletions(-)
>