* Handle a watchdog timeout by dumping interrupt information and * then either dropping to DDB or panicking. */
| 803 | * then either dropping to DDB or panicking. |
| 804 | */ |
| 805 | static void |
| 806 | watchdog_fire(void) |
| 807 | { |
| 808 | int nintr; |
| 809 | uint64_t inttotal; |
| 810 | u_long *curintr; |
| 811 | char *curname; |
| 812 | |
| 813 | curintr = intrcnt; |
| 814 | curname = intrnames; |
| 815 | inttotal = 0; |
| 816 | nintr = sintrcnt / sizeof(u_long); |
| 817 | |
| 818 | printf("interrupt total\n"); |
| 819 | while (--nintr >= 0) { |
| 820 | if (*curintr) |
| 821 | printf("%-12s %20lu\n", curname, *curintr); |
| 822 | curname += strlen(curname) + 1; |
| 823 | inttotal += *curintr++; |
| 824 | } |
| 825 | printf("Total %20ju\n", (uintmax_t)inttotal); |
| 826 | |
| 827 | #if defined(KDB) && !defined(KDB_UNATTENDED) |
| 828 | kdb_backtrace(); |
| 829 | kdb_enter(KDB_WHY_WATCHDOG, "watchdog timeout"); |
| 830 | #else |
| 831 | panic("watchdog timeout"); |
| 832 | #endif |
| 833 | } |
no test coverage detected