summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorPeter Zijlstra2009-06-02 21:02:36 +0200
committerIngo Molnar2009-06-02 21:45:34 +0200
commit436224a6d8bb3e29fe0cc18122f8d1f593da67b8 (patch)
treec7e3897c7c6059d31eb1fa3917aa59436f4cb6d1 /Documentation
parentperf_counter tools: Fix up the ABI shakeup (diff)
downloadkernel-qcow2-linux-436224a6d8bb3e29fe0cc18122f8d1f593da67b8.tar.gz
kernel-qcow2-linux-436224a6d8bb3e29fe0cc18122f8d1f593da67b8.tar.xz
kernel-qcow2-linux-436224a6d8bb3e29fe0cc18122f8d1f593da67b8.zip
perf report: Separate out idle threads
Introduce the special comm name [idle] for idle theads. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/perf_counter/builtin-report.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c
index 19c1e056bb66..6d68f3aa86b7 100644
--- a/Documentation/perf_counter/builtin-report.c
+++ b/Documentation/perf_counter/builtin-report.c
@@ -612,6 +612,17 @@ static size_t output__fprintf(FILE *fp, uint64_t total_samples)
return ret;
}
+static void register_idle_thread(void)
+{
+ struct thread *thread = threads__findnew(0);
+
+ if (thread == NULL ||
+ thread__set_comm(thread, "[idle]")) {
+ fprintf(stderr, "problem inserting idle task.\n");
+ exit(-1);
+ }
+}
+
static int __cmd_report(void)
{
@@ -626,6 +637,8 @@ static int __cmd_report(void)
char cwd[PATH_MAX], *cwdp = cwd;
int cwdlen;
+ register_idle_thread();
+
input = open(input_name, O_RDONLY);
if (input < 0) {
perror("failed to open file");