commit | 436224a6d8bb3e29fe0cc18122f8d1f593da67b8 | [log] [tgz] |
---|---|---|
author | Peter Zijlstra <[email protected]> | Tue Jun 02 21:02:36 2009 +0200 |
committer | Ingo Molnar <[email protected]> | Tue Jun 02 21:45:34 2009 +0200 |
tree | c7e3897c7c6059d31eb1fa3917aa59436f4cb6d1 | |
parent | c70975bc8d5bac487616785f5d5bc7b090dfa2d9 [diff] [blame] |
perf report: Separate out idle threads Introduce the special comm name [idle] for idle theads. Signed-off-by: Peter Zijlstra <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Corey Ashford <[email protected]> Cc: Marcelo Tosatti <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: John Kacur <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c index 19c1e05..6d68f3a 100644 --- a/Documentation/perf_counter/builtin-report.c +++ b/Documentation/perf_counter/builtin-report.c
@@ -612,6 +612,17 @@ 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 @@ 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");