From owner-svn-src-all@FreeBSD.ORG Thu Oct 27 09:43:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04233106566B; Thu, 27 Oct 2011 09:43:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7FCD8FC12; Thu, 27 Oct 2011 09:43:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9R9hPca095001; Thu, 27 Oct 2011 09:43:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R9hPpF094998; Thu, 27 Oct 2011 09:43:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110270943.p9R9hPpF094998@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 27 Oct 2011 09:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226829 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 09:43:26 -0000 Author: glebius Date: Thu Oct 27 09:43:25 2011 New Revision: 226829 URL: http://svn.freebsd.org/changeset/base/226829 Log: - If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed invariants. - Reduce tautology in NETGRAPH_DEBUG output. Modified: head/sys/netgraph/netgraph.h head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/netgraph.h ============================================================================== --- head/sys/netgraph/netgraph.h Thu Oct 27 08:44:07 2011 (r226828) +++ head/sys/netgraph/netgraph.h Thu Oct 27 09:43:25 2011 (r226829) @@ -57,6 +57,7 @@ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_netgraph.h" +#include "opt_kdb.h" #endif /* debugging options */ @@ -190,7 +191,7 @@ static __inline void _chkhook(hook_p hook, char *file, int line) { if (hook->hk_magic != HK_MAGIC) { - printf("Accessing freed hook "); + printf("Accessing freed "); dumphook(hook, file, line); } hook->lastline = line; @@ -458,7 +459,7 @@ static __inline void _chknode(node_p node, char *file, int line) { if (node->nd_magic != ND_MAGIC) { - printf("Accessing freed node "); + printf("Accessing freed "); dumpnode(node, file, line); } node->lastline = line; Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Thu Oct 27 08:44:07 2011 (r226828) +++ head/sys/netgraph/ng_base.c Thu Oct 27 09:43:25 2011 (r226829) @@ -3167,6 +3167,9 @@ dumphook (hook_p hook, char *file, int l hook->lastfile, hook->lastline); if (line) { printf(" problem discovered at file %s, line %d\n", file, line); +#ifdef KDB + kdb_backtrace(); +#endif } } @@ -3181,6 +3184,9 @@ dumpnode(node_p node, char *file, int li node->lastfile, node->lastline); if (line) { printf(" problem discovered at file %s, line %d\n", file, line); +#ifdef KDB + kdb_backtrace(); +#endif } }