perf tools: Unify swapper tasks naming
authorFrederic Weisbecker <[email protected]>
Mon, 31 Aug 2009 04:45:20 +0000 (06:45 +0200)
committerIngo Molnar <[email protected]>
Mon, 31 Aug 2009 08:04:49 +0000 (10:04 +0200)
In perf tools, we hardcode the pid 0 cmdline resolving to
"idle" because the init task is not included in the COMM
events.

But the idle tasks secondary cpus are resolved into their
"init" name through the COMM events.

We have then such strange result in perf report (ditto with
trace):

    19.66%       init    [kernel]          [k] acpi_idle_enter_c1
    17.32%       [idle]  [kernel]          [k] acpi_idle_enter_c1

It's then better to unify the swapper tasks into a single init
name.

Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
LKML-Reference: <1251693921[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/thread.c

index 3acd37f54888b620718a0096b3fe5a74f032c777..7635928ca278b4b5da0fbecc22c77932e9810f5c 100644 (file)
@@ -85,7 +85,7 @@ register_idle_thread(struct rb_root *threads, struct thread **last_match)
 {
        struct thread *thread = threads__findnew(0, threads, last_match);
 
-       if (!thread || thread__set_comm(thread, "[idle]")) {
+       if (!thread || thread__set_comm(thread, "[init]")) {
                fprintf(stderr, "problem inserting idle task.\n");
                exit(-1);
        }