linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] perf/core: what is exclude_idle supposed to do
@ 2018-04-16 22:04 Stephane Eranian
  2018-04-17  6:20 ` Jiri Olsa
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stephane Eranian @ 2018-04-16 22:04 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Jiri Olsa, Arnaldo Carvalho de Melo, mingo,
	Andi Kleen, Vince Weaver

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?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-20 18:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-04-20  8:35 ` Peter Zijlstra

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).