Add queue(2) debug macros as build options
Add QUEUE_MACRO_DEBUG_TRACE and QUEUE_MACRO_DEBUG_TRASH as proper kernel options. While here, alpha-sort the debug section of sys/conf/options. Enable QUEUE_MACRO_DEBUG_TRASH in amd64 GENERIC (but not GENERIC-NODEBUG) kernels. It is similar in nature and cost to other use-after-free pointer trashing we do in GENERIC. It is probably reasonable to enable in any arch GENERIC kernel that defines INVARIANTS.
This commit is contained in:
parent
47308803e7
commit
37bd4ba94b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359829
@ -96,6 +96,7 @@ options GDB # Support remote GDB.
|
||||
options DEADLKRES # Enable the deadlock resolver
|
||||
options INVARIANTS # Enable calls of extra sanity checking
|
||||
options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
|
||||
options QUEUE_MACRO_DEBUG_TRASH # Trash queue(2) internal pointers on invalidation
|
||||
options WITNESS # Enable checks to detect deadlocks and cycles
|
||||
options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
|
||||
options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
|
||||
|
@ -40,3 +40,4 @@ nooptions FULL_BUF_TRACKING
|
||||
nooptions COVERAGE
|
||||
nooptions KCOV
|
||||
nooptions MALLOC_DEBUG_MAXZONES
|
||||
nooptions QUEUE_MACRO_DEBUG_TRASH
|
||||
|
@ -413,6 +413,18 @@ options DDB_NUMSYM
|
||||
#
|
||||
options GDB
|
||||
|
||||
#
|
||||
# Trashes list pointers when they become invalid (i.e., the element is
|
||||
# removed from a list). Relatively inexpensive to enable.
|
||||
#
|
||||
options QUEUE_MACRO_DEBUG_TRASH
|
||||
|
||||
#
|
||||
# Stores information about the last caller to modify the list object
|
||||
# in the list object. Requires additional memory overhead.
|
||||
#
|
||||
options QUEUE_MACRO_DEBUG_TRACE
|
||||
|
||||
#
|
||||
# SYSCTL_DEBUG enables a 'sysctl' debug tree that can be used to dump the
|
||||
# contents of the registered sysctl nodes on the console. It is disabled by
|
||||
|
@ -55,17 +55,19 @@ DDB_CAPTURE_DEFAULTBUFSIZE opt_ddb.h
|
||||
DDB_CAPTURE_MAXBUFSIZE opt_ddb.h
|
||||
DDB_CTF opt_ddb.h
|
||||
DDB_NUMSYM opt_ddb.h
|
||||
EARLY_PRINTF opt_global.h
|
||||
FULL_BUF_TRACKING opt_global.h
|
||||
GDB
|
||||
KDB opt_global.h
|
||||
KDB_TRACE opt_kdb.h
|
||||
KDB_UNATTENDED opt_kdb.h
|
||||
KLD_DEBUG opt_kld.h
|
||||
NUM_CORE_FILES opt_global.h
|
||||
QUEUE_MACRO_DEBUG_TRACE opt_global.h
|
||||
QUEUE_MACRO_DEBUG_TRASH opt_global.h
|
||||
SYSCTL_DEBUG opt_sysctl.h
|
||||
EARLY_PRINTF opt_global.h
|
||||
TEXTDUMP_PREFERRED opt_ddb.h
|
||||
TEXTDUMP_VERBOSE opt_ddb.h
|
||||
NUM_CORE_FILES opt_global.h
|
||||
TSLOG opt_global.h
|
||||
TSLOGSIZE opt_global.h
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user