PERFORCE change 61698 for review
John Baldwin
jhb at FreeBSD.org
Fri Sep 17 08:00:19 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=61698
Change 61698 by jhb at 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);
}
More information about the p4-projects
mailing list