[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210119173442.GA1717058@krava>
Date: Tue, 19 Jan 2021 18:34:42 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>,
Ian Rogers <irogers@...gle.com>,
Stephane Eranian <eranian@...gle.com>,
Alexei Budankov <abudankov@...wei.com>
Subject: Re: [PATCH 1/4] perf tools: Allow to enable/disable events via
control file
On Tue, Jan 19, 2021 at 11:16:37AM -0300, Arnaldo Carvalho de Melo wrote:
SNIP
> > terminal 2:
> > bash 33349 [034] 149632.228023: sched:sched_process_fork: comm=bash pid=33349 child_comm=bash child_pid=34059
> > bash 33349 [034] 149632.228050: sched:sched_wakeup_new: bash:34059 [120] success=1 CPU:036
> > bash 33349 [034] 149633.950005: sched:sched_process_fork: comm=bash pid=33349 child_comm=bash child_pid=34060
> > bash 33349 [034] 149633.950030: sched:sched_wakeup_new: bash:34060 [120] success=1 CPU:036
>
> 'disable' doesn't seem to be working:
>
> Terminal 3:
>
> [root@...e ~]# echo 'enable sched:sched_process_fork' > control
> [root@...e ~]# echo 'disable sched:sched_process_fork' > control
> [root@...e ~]# echo 'disable' > control
> [root@...e ~]# echo 'disable sched:sched_process_fork' > control
> [root@...e ~]# echo 'disable sched:sched_process_fork' > control
> [root@...e ~]# echo 'enable sched:sched_process_fork' > control
> [root@...e ~]# echo 'disable sched:sched_process_fork' > control
> [root@...e ~]# echo 'enable sched:sched_process_fork' > control
> [root@...e ~]# echo 'disable sched:sched_process_fork' > control
> [root@...e ~]# echo 'enable' > control
> [root@...e ~]# echo 'disable' > control
> [root@...e ~]# echo 'disable' > control
> [root@...e ~]# echo 'disable' > control
> [root@...e ~]#
>
> Terminal 1:
>
> [root@...e ~]# perf record --control=fifo:control,ack -D -1 --no-buffering -e 'sched:*' > perf.pipe
> Events disabled
> Event sched:sched_process_fork enabled
> Event sched:sched_process_fork disabled
> Event sched:sched_process_fork enabled
> Event sched:sched_process_fork disabled
> Events enabled
>
> I tried also with '-o -', made no difference and:
>
> [root@...e ~]# perf record --control=fifo:control,ack -D -1 --no-buffering -e 'sched:*' -o - > perf.pipe
> Events disabled
> Event sched:sched_process_fork enabled
> Event sched:sched_process_fork disabled
> Event sched:sched_process_fork disabled
>
> The second probably should be more clear stating that that event was
> already disabled.
ok, I'll make patch for that
>
> Probably your example with all the sched tracepoints make 'perf record'
> just process the stream of events and not look at the commands?
hum, I'm not sure I understand what's the problem apart
from not printing that the event is already disabled
some events are not disabed?
>
> If I try with:
>
> [root@...e ~]# perf list sched:sched_process_* 2> /dev/null
>
> List of pre-defined events (to be used in -e):
>
> sched:sched_process_exec [Tracepoint event]
> sched:sched_process_exit [Tracepoint event]
> sched:sched_process_fork [Tracepoint event]
> sched:sched_process_free [Tracepoint event]
> sched:sched_process_wait [Tracepoint event]
>
> [root@...e ~]#
>
> [root@...e ~]# perf record --control=fifo:control,ack -D -1 --no-buffering -e 'sched:sched_process_*' -o - > perf.pipe
> Events disabled
> Events enabled
> Events disabled
>
> It works.
>
> So it is a pre-existing problem, I'll continue processing your patches
> and make a note about this...
ok, I'll check the note
thanks,
jirka
Powered by blists - more mailing lists