Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163750
b: refs/heads/master
c: 3e30414
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Sep 13, 2009
1 parent 425cf18 commit 9c3a7ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea92ed5a8f4e6c638efe7de2efe8a875d580ad3f
refs/heads/master: 3e304147cdb404ce6d1dd0e50cb19f52142bb363
11 changes: 10 additions & 1 deletion trunk/tools/perf/builtin-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 9c3a7ac

Please sign in to comment.