Date: Fri, 17 Sep 2004 15:00:18 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 61698 for review Message-ID: <200409171500.i8HF0ISs084341@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=61698 Change 61698 by jhb@jhb_slimer on 2004/09/17 15:00:11 Add a stracktrace test. Affected files ... .. //depot/projects/smpng/sys/modules/crash/crash.c#14 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash/crash.c#14 (text+ko) ==== @@ -54,7 +54,7 @@ #include <sys/sysctl.h> #include <sys/systm.h> -#define MAX_EVENT 20 +#define MAX_EVENT 21 static struct sx foo, bar, bar2; static struct cv event_cv; @@ -83,6 +83,7 @@ "try lock tests including recursion test", "test witness_defineorder and witness_checkorder", "blow the kernel stack on purpose", + "test deep stack backtraces", }; static int mod_event(struct module *module, int cmd, void *arg); @@ -124,6 +125,17 @@ } static void +recurse_deep(int depth) +{ + + if (depth == 20) { + kdb_backtrace(); + kdb_enter(__func__); + } else + recurse_deep(depth + 1); +} + +static void crash_thread(void *arg) { int ev, status; @@ -306,6 +318,9 @@ case 20: (void)blow_stack(); break; + case 21: + recurse_deep(0); + break; default: panic("event %d is bogus\n", event); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409171500.i8HF0ISs084341>