diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/latencytop.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/kernel/latencytop.c b/kernel/latencytop.c index 17110a4a4fc2..ee74b35e528d 100644 --- a/kernel/latencytop.c +++ b/kernel/latencytop.c | |||
@@ -241,24 +241,19 @@ static int lstats_show(struct seq_file *m, void *v) | |||
241 | seq_puts(m, "Latency Top version : v0.1\n"); | 241 | seq_puts(m, "Latency Top version : v0.1\n"); |
242 | 242 | ||
243 | for (i = 0; i < MAXLR; i++) { | 243 | for (i = 0; i < MAXLR; i++) { |
244 | if (latency_record[i].backtrace[0]) { | 244 | struct latency_record *lr = &latency_record[i]; |
245 | |||
246 | if (lr->backtrace[0]) { | ||
245 | int q; | 247 | int q; |
246 | seq_printf(m, "%i %lu %lu ", | 248 | seq_printf(m, "%i %lu %lu", |
247 | latency_record[i].count, | 249 | lr->count, lr->time, lr->max); |
248 | latency_record[i].time, | ||
249 | latency_record[i].max); | ||
250 | for (q = 0; q < LT_BACKTRACEDEPTH; q++) { | 250 | for (q = 0; q < LT_BACKTRACEDEPTH; q++) { |
251 | char sym[KSYM_SYMBOL_LEN]; | 251 | unsigned long bt = lr->backtrace[q]; |
252 | char *c; | 252 | if (!bt) |
253 | if (!latency_record[i].backtrace[q]) | ||
254 | break; | 253 | break; |
255 | if (latency_record[i].backtrace[q] == ULONG_MAX) | 254 | if (bt == ULONG_MAX) |
256 | break; | 255 | break; |
257 | sprint_symbol(sym, latency_record[i].backtrace[q]); | 256 | seq_printf(m, " %ps", (void *)bt); |
258 | c = strchr(sym, '+'); | ||
259 | if (c) | ||
260 | *c = 0; | ||
261 | seq_printf(m, "%s ", sym); | ||
262 | } | 257 | } |
263 | seq_printf(m, "\n"); | 258 | seq_printf(m, "\n"); |
264 | } | 259 | } |