If any of various debug kernel options are enabled, set a LOCK_DEBUG
cpp macro that can be used to differentiate code generation for locking functions.
This commit is contained in:
parent
6ddf73fcd4
commit
1f9362e16d
@ -123,6 +123,19 @@ struct lock_list_entry {
|
|||||||
u_int ll_count;
|
u_int ll_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If any of WITNESS, INVARIANTS, or KTR_LOCK KTR tracing has been enabled,
|
||||||
|
* then turn on LOCK_DEBUG. When this option is on, extra debugging
|
||||||
|
* facilities such as tracking the file and line number of lock operations
|
||||||
|
* are enabled. Also, mutex locking operations are not inlined to avoid
|
||||||
|
* bloat from all the extra debugging code. We also have to turn on all the
|
||||||
|
* calling conventions for this debugging code in modules so that modules can
|
||||||
|
* work with both debug and non-debug kernels.
|
||||||
|
*/
|
||||||
|
#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || (defined(KTR) && (KTR_COMPILE & KTR_LOCK))
|
||||||
|
#define LOCK_DEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macros for KTR_LOCK tracing.
|
* Macros for KTR_LOCK tracing.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user