Disable the g_sanity() check unless people ask for it in the debugflags.

Sponsored by:	DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-09-30 08:46:29 +00:00
parent 117ed71ada
commit 5dcf28b202
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104191
2 changed files with 6 additions and 0 deletions

View file

@ -41,6 +41,10 @@ TAILQ_HEAD(event_tailq_head, g_event);
extern struct event_tailq_head events;
extern int g_debugflags;
/* 1 G_T_TOPOLOGY */
/* 2 G_T_BIO */
/* 4 G_T_ACCESS */
/* 8 enable sanity checks */
/*
* Various internal actions are tracked by tagging g_event[s] onto

View file

@ -670,6 +670,8 @@ g_sanity(void *ptr)
struct g_consumer *cp;
struct g_provider *pp;
if (!(g_debugflags & 0x8))
return;
LIST_FOREACH(mp, &g_classes, class) {
KASSERT(mp != ptr, ("Ptr is live class"));
KASSERT(mp->protect == 0x20016600,