[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-80ed0987f363d7eb50193df3e6f6d71451f74bc3@git.kernel.org>
Date: Wed, 16 Sep 2009 10:25:59 GMT
From: tip-bot for Ingo Molnar <mingo@...e.hu>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
efault@....de, fweisbec@...il.com, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:perfcounters/core] perf sched: Make idle thread and comm/pid names more consistent
Commit-ID: 80ed0987f363d7eb50193df3e6f6d71451f74bc3
Gitweb: http://git.kernel.org/tip/80ed0987f363d7eb50193df3e6f6d71451f74bc3
Author: Ingo Molnar <mingo@...e.hu>
AuthorDate: Wed, 16 Sep 2009 14:12:36 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 16 Sep 2009 12:15:47 +0200
perf sched: Make idle thread and comm/pid names more consistent
Peter noticed that we have 3 ways of referring to the idle thread:
[idle]:0
swapper:0
swapper-0
Standardize on 'swapper:0'.
Reported-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
tools/perf/builtin-sched.c | 4 ++--
tools/perf/util/thread.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 2d54236..da8f674 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1204,13 +1204,13 @@ static void output_lat_thread(struct work_atoms *work_list)
/*
* Ignore idle threads:
*/
- if (!work_list->thread->pid)
+ if (!strcmp(work_list->thread->comm, "swapper"))
return;
all_runtime += work_list->total_runtime;
all_count += work_list->nb_atoms;
- ret = printf(" %s-%d ", work_list->thread->comm, work_list->thread->pid);
+ ret = printf(" %s:%d ", work_list->thread->comm, work_list->thread->pid);
for (i = 0; i < 24 - ret; i++)
printf(" ");
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 7635928..12c4341 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -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, "[init]")) {
+ if (!thread || thread__set_comm(thread, "swapper")) {
fprintf(stderr, "problem inserting idle task.\n");
exit(-1);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists