From 9c3a7ac80d4c198cfb185420aea0684393dc7d9f Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sat, 12 Sep 2009 10:08:34 +0200 Subject: [PATCH] --- yaml --- r: 163750 b: refs/heads/master c: 3e304147cdb404ce6d1dd0e50cb19f52142bb363 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-sched.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 5ee965aafd87..502d732c78d7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ea92ed5a8f4e6c638efe7de2efe8a875d580ad3f +refs/heads/master: 3e304147cdb404ce6d1dd0e50cb19f52142bb363 diff --git a/trunk/tools/perf/builtin-sched.c b/trunk/tools/perf/builtin-sched.c index c382f530d4c6..727cc5b852c2 100644 --- a/trunk/tools/perf/builtin-sched.c +++ b/trunk/tools/perf/builtin-sched.c @@ -1087,6 +1087,9 @@ static struct trace_sched_handler lat_ops = { .fork_event = latency_fork_event, }; +static u64 all_runtime; +static u64 all_count; + static void output_lat_thread(struct thread_latency *lat) { struct lat_snapshot *shot; @@ -1111,6 +1114,9 @@ static void output_lat_thread(struct thread_latency *lat) total += delta; } + all_runtime += total_runtime; + all_count += count; + if (!count) return; @@ -1133,7 +1139,7 @@ static void __cmd_lat(void) read_events(); printf("-----------------------------------------------------------------------------------\n"); - printf(" Task | runtime ms | switches | average delay ms | maximum delay ms |\n"); + printf(" Task | Runtime ms | Switches | Average delay ms | Maximum delay ms |\n"); printf("-----------------------------------------------------------------------------------\n"); next = rb_first(&lat_snapshot_root); @@ -1147,6 +1153,9 @@ static void __cmd_lat(void) } printf("-----------------------------------------------------------------------------------\n"); + printf(" TOTAL: |%9.3f ms |%9Ld |\n", + (double)all_runtime/1e9, all_count); + printf("---------------------------------------------\n"); } static struct trace_sched_handler *trace_handler;