Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175433
b: refs/heads/master
c: 3786310
h: refs/heads/master
i:
  175431: 36db7d6
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Dec 10, 2009
1 parent 383cf90 commit 4ba391b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: 5660ce34241ab204bf78fbcaa5e09318c2748d37
refs/heads/master: 3786310afe738070be31c439b8deeaeb69b9735d
16 changes: 10 additions & 6 deletions trunk/tools/perf/builtin-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ struct work_atoms {
struct thread *thread;
struct rb_node node;
u64 max_lat;
u64 max_lat_at;
u64 total_lat;
u64 nb_atoms;
u64 total_runtime;
Expand Down Expand Up @@ -1013,8 +1014,10 @@ add_sched_in_event(struct work_atoms *atoms, u64 timestamp)

delta = atom->sched_in_time - atom->wake_up_time;
atoms->total_lat += delta;
if (delta > atoms->max_lat)
if (delta > atoms->max_lat) {
atoms->max_lat = delta;
atoms->max_lat_at = timestamp;
}
atoms->nb_atoms++;
}

Expand Down Expand Up @@ -1210,10 +1213,11 @@ static void output_lat_thread(struct work_atoms *work_list)

avg = work_list->total_lat / work_list->nb_atoms;

printf("|%11.3f ms |%9llu | avg:%9.3f ms | max:%9.3f ms |\n",
printf("|%11.3f ms |%9llu | avg:%9.3f ms | max:%9.3f ms | max at: %9.6f s\n",
(double)work_list->total_runtime / 1e6,
work_list->nb_atoms, (double)avg / 1e6,
(double)work_list->max_lat / 1e6);
(double)work_list->max_lat / 1e6,
(double)work_list->max_lat_at / 1e9);
}

static int pid_cmp(struct work_atoms *l, struct work_atoms *r)
Expand Down Expand Up @@ -1704,9 +1708,9 @@ static void __cmd_lat(void)
read_events();
sort_lat();

printf("\n -----------------------------------------------------------------------------------------\n");
printf(" Task | Runtime ms | Switches | Average delay ms | Maximum delay ms |\n");
printf(" -----------------------------------------------------------------------------------------\n");
printf("\n ---------------------------------------------------------------------------------------------------------------\n");
printf(" Task | Runtime ms | Switches | Average delay ms | Maximum delay ms | Maximum delay at |\n");
printf(" ---------------------------------------------------------------------------------------------------------------\n");

next = rb_first(&sorted_atom_root);

Expand Down

0 comments on commit 4ba391b

Please sign in to comment.