diff options
-rw-r--r-- | tools/perf/builtin-sched.c | 17 | ||||
-rw-r--r-- | tools/perf/util/trace-event-read.c | 6 |
2 files changed, 13 insertions, 10 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 84699cf036ab..a084c284e198 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1096,14 +1096,15 @@ static void output_lat_thread(struct thread_latency *lat) | |||
1096 | if (!count) | 1096 | if (!count) |
1097 | return; | 1097 | return; |
1098 | 1098 | ||
1099 | ret = printf("%s", lat->thread->comm); | 1099 | ret = printf(" %s ", lat->thread->comm); |
1100 | 1100 | ||
1101 | for (i = 0; i < 25 - ret; i++) | 1101 | for (i = 0; i < 19 - ret; i++) |
1102 | printf(" "); | 1102 | printf(" "); |
1103 | 1103 | ||
1104 | avg = total / count; | 1104 | avg = total / count; |
1105 | 1105 | ||
1106 | printf("%5d %10llu %10llu %10llu\n", count, total, avg, max); | 1106 | printf("|%9.3f ms |%9d | avg:%9.3f ms | max:%9.3f ms |\n", |
1107 | 0.0, count, (double)avg/1e9, (double)max/1e9); | ||
1107 | } | 1108 | } |
1108 | 1109 | ||
1109 | static void __cmd_lat(void) | 1110 | static void __cmd_lat(void) |
@@ -1113,11 +1114,9 @@ static void __cmd_lat(void) | |||
1113 | setup_pager(); | 1114 | setup_pager(); |
1114 | read_events(); | 1115 | read_events(); |
1115 | 1116 | ||
1116 | printf(" Tasks"); | 1117 | printf("-----------------------------------------------------------------------------------\n"); |
1117 | printf(" count"); | 1118 | printf(" Task | runtime ms | switches | average delay ms | maximum delay ms |\n"); |
1118 | printf(" total"); | 1119 | printf("-----------------------------------------------------------------------------------\n"); |
1119 | printf(" avg"); | ||
1120 | printf(" max\n\n"); | ||
1121 | 1120 | ||
1122 | next = rb_first(&lat_snapshot_root); | 1121 | next = rb_first(&lat_snapshot_root); |
1123 | 1122 | ||
@@ -1128,6 +1127,8 @@ static void __cmd_lat(void) | |||
1128 | output_lat_thread(lat); | 1127 | output_lat_thread(lat); |
1129 | next = rb_next(next); | 1128 | next = rb_next(next); |
1130 | } | 1129 | } |
1130 | |||
1131 | printf("-----------------------------------------------------------------------------------\n"); | ||
1131 | } | 1132 | } |
1132 | 1133 | ||
1133 | static struct trace_sched_handler *trace_handler; | 1134 | static struct trace_sched_handler *trace_handler; |
diff --git a/tools/perf/util/trace-event-read.c b/tools/perf/util/trace-event-read.c index a1217a10632f..1b5c847d2c22 100644 --- a/tools/perf/util/trace-event-read.c +++ b/tools/perf/util/trace-event-read.c | |||
@@ -458,12 +458,13 @@ struct record *trace_read_data(int cpu) | |||
458 | return data; | 458 | return data; |
459 | } | 459 | } |
460 | 460 | ||
461 | void trace_report (void) | 461 | void trace_report(void) |
462 | { | 462 | { |
463 | const char *input_file = "trace.info"; | 463 | const char *input_file = "trace.info"; |
464 | char buf[BUFSIZ]; | 464 | char buf[BUFSIZ]; |
465 | char test[] = { 23, 8, 68 }; | 465 | char test[] = { 23, 8, 68 }; |
466 | char *version; | 466 | char *version; |
467 | int show_version = 0; | ||
467 | int show_funcs = 0; | 468 | int show_funcs = 0; |
468 | int show_printk = 0; | 469 | int show_printk = 0; |
469 | 470 | ||
@@ -480,7 +481,8 @@ void trace_report (void) | |||
480 | die("not a trace file (missing tracing)"); | 481 | die("not a trace file (missing tracing)"); |
481 | 482 | ||
482 | version = read_string(); | 483 | version = read_string(); |
483 | printf("version = %s\n", version); | 484 | if (show_version) |
485 | printf("version = %s\n", version); | ||
484 | free(version); | 486 | free(version); |
485 | 487 | ||
486 | read_or_die(buf, 1); | 488 | read_or_die(buf, 1); |