[0/2] Optimize pid filters and add --no-filter option
mbox series

Message ID 20190415104343.31113-1-kaslevs@vmware.com
Headers show
Series
  • Optimize pid filters and add --no-filter option
Related show

Message

Slavomir Kaslev April 15, 2019, 10:43 a.m. UTC
This patchset optimizes how pid filters are expressed and makes it less likely
that we overflow ftrace filters' size limit of one page.

Slavomir Kaslev (2):
  trace-cmd: Optimize how pid filters are expressed
  trace-cmd: Add --no-filter option to not filter recording processes

 tracecmd/trace-record.c | 126 +++++++++++++++++++++++++++-------------
 tracecmd/trace-usage.c  |   1 +
 2 files changed, 87 insertions(+), 40 deletions(-)

Comments

Phil Auld April 15, 2019, 1:59 p.m. UTC | #1
On Mon, Apr 15, 2019 at 01:43:41PM +0300 Slavomir Kaslev wrote:
> This patchset optimizes how pid filters are expressed and makes it less likely
> that we overflow ftrace filters' size limit of one page.
> 
> Slavomir Kaslev (2):
>   trace-cmd: Optimize how pid filters are expressed
>   trace-cmd: Add --no-filter option to not filter recording processes
> 
>  tracecmd/trace-record.c | 126 +++++++++++++++++++++++++++-------------
>  tracecmd/trace-usage.c  |   1 +
>  2 files changed, 87 insertions(+), 40 deletions(-)
> 
> -- 
> 2.19.1
> 

That worked very nicely on my setup. Collapsed from len 6300+ to :

WRITE: /sys/kernel/tracing/events/sched/sched_switch/filter, len 70, data "(common_pid<13247||common_pid>13088)||(next_pid<13247||next_pid>13088)"


--no-filter also worked as advertised.

Thanks!



Acked-by: Phil Auld <pauld@redhat.com>

--