From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
Andi Kleen <ak@linux.intel.com>,
Vince Weaver <vincent.weaver@maine.edu>,
acme@kernel.org
Subject: Re: [RFC] perf/core: what is exclude_idle supposed to do
Date: Tue, 17 Apr 2018 10:40:08 -0300 [thread overview]
Message-ID: <20180417134008.GA2350@redhat.com> (raw)
In-Reply-To: <CABPqkBS6MuO6Twtq=_+TDV=RNy0_2vRWf=LVCk6wk0tPwNSTog@mail.gmail.com>
Em Mon, Apr 16, 2018 at 10:04:53PM +0000, Stephane Eranian escreveu:
> Hi,
>
> I am trying to understand what the exclude_idle event attribute is supposed
> to accomplish.
> As per the definition in the header file:
>
> exclude_idle : 1, /* don't count when idle */
>
> Naively, I thought it would simply stop the event when running in the
> context of the idle task (swapper, pid 0) on any CPU. That would seem to
> match the succinct description.
>
> However, running a simple:
>
> $ perf record -a -e cycles:I sleep 5
> perf_event_attr:
> sample_type IP|TID|TIME|CPU|PERIOD
> read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID
> exclude_idle 1
>
> on an idle machine, showed me that this is not what is actually happening:
> $ perf script
> swapper 0 [000] 1132634.287442: 1 cycles:I:
> ffffffff8100b1fb __intel_pmu_enable_all.isra.17 ([kernel.kallsyms])
> swapper 0 [001] 1132634.287498: 1 cycles:I:
> ffffffff8100b1fb __intel_pmu_enable_all.isra.17 ([kernel.kallsyms])
>
>
> After looking at the code, it all made sense, it seems to current
> implementation is only relevant for sw events. I don't understand why.
>
> I am left wondering what is the goal of exclude_idle?
To do something it is not doing, i.e. to do what you expected it to do.
There were messages exchanged recently where PeterZ said that this is
just that needs fixing.
- Arnaldo
next prev parent reply other threads:[~2018-04-17 13:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 22:04 [RFC] perf/core: what is exclude_idle supposed to do Stephane Eranian
2018-04-17 6:20 ` Jiri Olsa
2018-04-18 15:10 ` Vince Weaver
2018-04-20 8:36 ` Peter Zijlstra
2018-04-20 14:18 ` Vince Weaver
2018-04-20 16:51 ` Vince Weaver
2018-04-20 18:19 ` Stephane Eranian
2018-04-17 13:40 ` Arnaldo Carvalho de Melo [this message]
2018-04-20 8:35 ` Peter Zijlstra
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=20180417134008.GA2350@redhat.com \
--to=acme@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=vincent.weaver@maine.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.