linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, lkml <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Michael Petlan <mpetlan@redhat.com>,
	Ian Rogers <irogers@google.com>,
	Stephane Eranian <eranian@google.com>,
	Alexei Budankov <abudankov@huawei.com>
Subject: Re: [PATCH 1/4] perf tools: Allow to enable/disable events via control file
Date: Tue, 19 Jan 2021 18:34:42 +0100	[thread overview]
Message-ID: <20210119173442.GA1717058@krava> (raw)
In-Reply-To: <20210119141637.GH12699@kernel.org>

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@five ~]# echo 'enable sched:sched_process_fork' > control
> [root@five ~]# echo 'disable sched:sched_process_fork' > control
> [root@five ~]# echo 'disable' > control
> [root@five ~]# echo 'disable sched:sched_process_fork' > control
> [root@five ~]# echo 'disable sched:sched_process_fork' > control
> [root@five ~]# echo 'enable sched:sched_process_fork' > control
> [root@five ~]# echo 'disable sched:sched_process_fork' > control
> [root@five ~]# echo 'enable sched:sched_process_fork' > control
> [root@five ~]# echo 'disable sched:sched_process_fork' > control
> [root@five ~]# echo 'enable' > control
> [root@five ~]# echo 'disable' > control
> [root@five ~]# echo 'disable' > control
> [root@five ~]# echo 'disable' > control
> [root@five ~]#
> 
> Terminal 1:
> 
> [root@five ~]# 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@five ~]# 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@five ~]# 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@five ~]#
> 
> [root@five ~]# 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


  reply	other threads:[~2021-01-19 18:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26 23:20 [PATCHv4 0/4] perf tools: Allow to enable/disable events via control pipe Jiri Olsa
2020-12-26 23:20 ` [PATCH 1/4] perf tools: Allow to enable/disable events via control file Jiri Olsa
2021-01-19 14:16   ` Arnaldo Carvalho de Melo
2021-01-19 17:34     ` Jiri Olsa [this message]
2020-12-26 23:20 ` [PATCH 2/4] perf tools: Add evlist control command Jiri Olsa
2020-12-26 23:20 ` [PATCH 3/4] perf tools: Add stop " Jiri Olsa
2020-12-26 23:20 ` [PATCH 4/4] perf tools: Add ping " Jiri Olsa
2021-01-07 12:12 ` [PATCHv4 0/4] perf tools: Allow to enable/disable events via control pipe Jiri Olsa
2021-01-08  6:10   ` Namhyung Kim
2021-01-19 14:30 ` Arnaldo Carvalho de Melo

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=20210119173442.GA1717058@krava \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=abudankov@huawei.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    /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).