diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-02 15:02:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-02 15:45:34 -0400 |
commit | 436224a6d8bb3e29fe0cc18122f8d1f593da67b8 (patch) | |
tree | c7e3897c7c6059d31eb1fa3917aa59436f4cb6d1 /Documentation | |
parent | c70975bc8d5bac487616785f5d5bc7b090dfa2d9 (diff) |
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.c | 13 |
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) | |||
612 | return ret; | 612 | return ret; |
613 | } | 613 | } |
614 | 614 | ||
615 | static void register_idle_thread(void) | ||
616 | { | ||
617 | struct thread *thread = threads__findnew(0); | ||
618 | |||
619 | if (thread == NULL || | ||
620 | thread__set_comm(thread, "[idle]")) { | ||
621 | fprintf(stderr, "problem inserting idle task.\n"); | ||
622 | exit(-1); | ||
623 | } | ||
624 | } | ||
625 | |||
615 | 626 | ||
616 | static int __cmd_report(void) | 627 | static int __cmd_report(void) |
617 | { | 628 | { |
@@ -626,6 +637,8 @@ static int __cmd_report(void) | |||
626 | char cwd[PATH_MAX], *cwdp = cwd; | 637 | char cwd[PATH_MAX], *cwdp = cwd; |
627 | int cwdlen; | 638 | int cwdlen; |
628 | 639 | ||
640 | register_idle_thread(); | ||
641 | |||
629 | input = open(input_name, O_RDONLY); | 642 | input = open(input_name, O_RDONLY); |
630 | if (input < 0) { | 643 | if (input < 0) { |
631 | perror("failed to open file"); | 644 | perror("failed to open file"); |