diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2017-03-15 09:32:43 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2017-05-26 17:12:39 -0400 |
commit | 0e8e8602ad72b1a6cee4c24869cd58b5c2b1d8c4 (patch) | |
tree | 02d58cca3ba5b3afc5f3fd5a526cca912ba480b4 | |
parent | d0248852b359571c21aece3b50ddc7f6fa942c3f (diff) |
Hook into hrtimer to TRACE() timer hangs
-rw-r--r-- | kernel/time/hrtimer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index feeaaff14b57..41bfdd417f00 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -1411,8 +1411,13 @@ retry: | |||
1411 | */ | 1411 | */ |
1412 | cpu_base->nr_hangs++; | 1412 | cpu_base->nr_hangs++; |
1413 | cpu_base->hang_detected = 1; | 1413 | cpu_base->hang_detected = 1; |
1414 | |||
1415 | TRACE("hrtimer hang detected on P%d: #%u \n", | ||
1416 | cpu_base->cpu, cpu_base->nr_hangs); | ||
1417 | |||
1414 | raw_spin_unlock(&cpu_base->lock); | 1418 | raw_spin_unlock(&cpu_base->lock); |
1415 | delta = ktime_sub(now, entry_time); | 1419 | delta = ktime_sub(now, entry_time); |
1420 | TRACE("hrtimer hang delta.tv64:%u\n", (unsigned int)delta.tv64); | ||
1416 | if ((unsigned int)delta.tv64 > cpu_base->max_hang_time) | 1421 | if ((unsigned int)delta.tv64 > cpu_base->max_hang_time) |
1417 | cpu_base->max_hang_time = (unsigned int) delta.tv64; | 1422 | cpu_base->max_hang_time = (unsigned int) delta.tv64; |
1418 | /* | 1423 | /* |
@@ -1423,6 +1428,9 @@ retry: | |||
1423 | expires_next = ktime_add_ns(now, 100 * NSEC_PER_MSEC); | 1428 | expires_next = ktime_add_ns(now, 100 * NSEC_PER_MSEC); |
1424 | else | 1429 | else |
1425 | expires_next = ktime_add(now, delta); | 1430 | expires_next = ktime_add(now, delta); |
1431 | |||
1432 | TRACE("hrtimer expires_next:%llu\n", expires_next.tv64); | ||
1433 | |||
1426 | tick_program_event(expires_next, 1); | 1434 | tick_program_event(expires_next, 1); |
1427 | printk_once(KERN_WARNING "hrtimer: interrupt took %llu ns\n", | 1435 | printk_once(KERN_WARNING "hrtimer: interrupt took %llu ns\n", |
1428 | ktime_to_ns(delta)); | 1436 | ktime_to_ns(delta)); |