diff options
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index c382f530d4c6..727cc5b852c2 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1087,6 +1087,9 @@ static struct trace_sched_handler lat_ops = { | |||
1087 | .fork_event = latency_fork_event, | 1087 | .fork_event = latency_fork_event, |
1088 | }; | 1088 | }; |
1089 | 1089 | ||
1090 | static u64 all_runtime; | ||
1091 | static u64 all_count; | ||
1092 | |||
1090 | static void output_lat_thread(struct thread_latency *lat) | 1093 | static void output_lat_thread(struct thread_latency *lat) |
1091 | { | 1094 | { |
1092 | struct lat_snapshot *shot; | 1095 | struct lat_snapshot *shot; |
@@ -1111,6 +1114,9 @@ static void output_lat_thread(struct thread_latency *lat) | |||
1111 | total += delta; | 1114 | total += delta; |
1112 | } | 1115 | } |
1113 | 1116 | ||
1117 | all_runtime += total_runtime; | ||
1118 | all_count += count; | ||
1119 | |||
1114 | if (!count) | 1120 | if (!count) |
1115 | return; | 1121 | return; |
1116 | 1122 | ||
@@ -1133,7 +1139,7 @@ static void __cmd_lat(void) | |||
1133 | read_events(); | 1139 | read_events(); |
1134 | 1140 | ||
1135 | printf("-----------------------------------------------------------------------------------\n"); | 1141 | printf("-----------------------------------------------------------------------------------\n"); |
1136 | printf(" Task | runtime ms | switches | average delay ms | maximum delay ms |\n"); | 1142 | printf(" Task | Runtime ms | Switches | Average delay ms | Maximum delay ms |\n"); |
1137 | printf("-----------------------------------------------------------------------------------\n"); | 1143 | printf("-----------------------------------------------------------------------------------\n"); |
1138 | 1144 | ||
1139 | next = rb_first(&lat_snapshot_root); | 1145 | next = rb_first(&lat_snapshot_root); |
@@ -1147,6 +1153,9 @@ static void __cmd_lat(void) | |||
1147 | } | 1153 | } |
1148 | 1154 | ||
1149 | printf("-----------------------------------------------------------------------------------\n"); | 1155 | printf("-----------------------------------------------------------------------------------\n"); |
1156 | printf(" TOTAL: |%9.3f ms |%9Ld |\n", | ||
1157 | (double)all_runtime/1e9, all_count); | ||
1158 | printf("---------------------------------------------\n"); | ||
1150 | } | 1159 | } |
1151 | 1160 | ||
1152 | static struct trace_sched_handler *trace_handler; | 1161 | static struct trace_sched_handler *trace_handler; |