From: Phil Auld <pauld@redhat.com>
To: John Kacur <jkacur@redhat.com>
Cc: Slavomir Kaslev <kaslevs@vmware.com>,
rostedt@goodmis.org, linux-trace-devel@vger.kernel.org,
ykaradzhov@vmware.com, jbacik@fb.com, tstoyanov@vmware.com,
slavomir.kaslev@gmail.com
Subject: Re: [PATCH v4 1/2] trace-cmd: Optimize how pid filters are expressed
Date: Wed, 17 Apr 2019 10:25:15 -0400 [thread overview]
Message-ID: <20190417142515.GF6118@pauld.bos.csb> (raw)
In-Reply-To: <alpine.LFD.2.21.1904171616010.6386@planxty>
On Wed, Apr 17, 2019 at 04:18:50PM +0200 John Kacur wrote:
>
>
> On Wed, 17 Apr 2019, Phil Auld wrote:
>
> > On Wed, Apr 17, 2019 at 04:09:58PM +0300 Slavomir Kaslev wrote:
> > > Express pid filters as allowed/disallowed filter ranges
> > >
> > > (pid>=100&&pid<=103)
> > >
> > > instead of specifying them per pid
> > >
> > > (pid==100||pid==101||pid==102||pid==103)
> > >
> > > This makes the size of the resulting filter smaller (and faster) and avoids
> > > overflowing the filter size limit of one page which we can hit on bigger
> > > machines (say >160 CPUs).
> >
> > This one works as well :)
> >
> > I finally hit a case where my trace-cmd pids were non-contiguous and
> > this split the range up correctly.
> >
> >
> > FILTER write /sys/kernel/debug/tracing/events/sched/sched_kthread_stop/filter (len 74) value "(common_pid<21420||common_pid>21425)&&(common_pid<21265||common_pid>21418)"
> > FILTER write /sys/kernel/debug/tracing/events/sched/sched_kthread_stop_ret/filter (len 74) value "(common_pid<21420||common_pid>21425)&&(common_pid<21265||common_pid>21418)"
> > ...
> > FILTER write /sys/kernel/debug/tracing/events/sched/sched_switch/filter (len 142) value "(common_pid<21420||common_pid>21425)&&(common_pid<21265||common_pid>21418)||(next_pid<21420||next_pid>21425)&&(next_pid<21265||next_pid>21418)"
>
> It seems crazy that we write "common_pid", instead of "pid" or "cpid", or
> something like that.
>
>
>
I assume those have to match fields in the trace event mechanism, but I don't know a lot
about it.
"pid" is used in the wakeup event filters:
FILTER write /sys/kernel/debug/tracing/events/sched/sched_wakeup_new/filter (len 122) value "(common_pid<21420||common_pid>21425)&&(common_pid<21265||common_pid>21418)||(pid<21420||pid>21425)&&(pid<21265||pid>21418)"
Cheers,
Phil
next prev parent reply other threads:[~2019-04-17 14:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 13:09 [PATCH v4 0/2] Optimize pid filters Slavomir Kaslev
2019-04-17 13:09 ` [PATCH v4 1/2] trace-cmd: Optimize how pid filters are expressed Slavomir Kaslev
2019-04-17 13:58 ` Phil Auld
2019-04-17 14:18 ` John Kacur
2019-04-17 14:25 ` Phil Auld [this message]
2019-04-17 14:52 ` Steven Rostedt
2019-04-17 14:52 ` Steven Rostedt
2019-04-17 14:54 ` Steven Rostedt
2019-04-17 13:09 ` [PATCH v4 2/2] trace-cmd: Document record --no-filter option in record's man page Slavomir Kaslev
2019-04-17 14:05 ` Phil Auld
2019-04-17 16:19 ` Steven Rostedt
2019-04-17 16:24 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190417142515.GF6118@pauld.bos.csb \
--to=pauld@redhat.com \
--cc=jbacik@fb.com \
--cc=jkacur@redhat.com \
--cc=kaslevs@vmware.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=slavomir.kaslev@gmail.com \
--cc=tstoyanov@vmware.com \
--cc=ykaradzhov@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).