MCPcopy Create free account
hub / github.com/F-Stack/f-stack / watchdog_fire

Function watchdog_fire

freebsd/kern/kern_clock.c:805–833  ·  view source on GitHub ↗

* Handle a watchdog timeout by dumping interrupt information and * then either dropping to DDB or panicking. */

Source from the content-addressed store, hash-verified

803 * then either dropping to DDB or panicking.
804 */
805static void
806watchdog_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}

Callers 1

hardclockFunction · 0.85

Calls 4

kdb_backtraceFunction · 0.85
kdb_enterFunction · 0.85
printfFunction · 0.70
panicFunction · 0.70

Tested by

no test coverage detected