diff options
author | jhb <jhb@FreeBSD.org> | 2006-01-24 22:23:45 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-01-24 22:23:45 +0000 |
commit | 35abe809de4d150d519eb1b2324e391e28cbbb89 (patch) | |
tree | 3146fc9bed53c177ea70c8e7794c510c93f0889d | |
parent | 7ee7ea66a8deaa30672a52fb012843cd7e9f7bc2 (diff) | |
download | FreeBSD-src-35abe809de4d150d519eb1b2324e391e28cbbb89.zip FreeBSD-src-35abe809de4d150d519eb1b2324e391e28cbbb89.tar.gz |
- Add a new KTR_SUBSYS in place of KTR_SPARE1 to serve as a subsystem
placeholder similar to KTR_DEV. Explain the use of KTR_DEV and
KTR_SUBSYS in a comment as well.
- Retire KTR_WITNESS and instead have KTR_WITNESS default to off but use
KTR_SUBSYS if it is enabled.
-rw-r--r-- | sys/kern/subr_witness.c | 6 | ||||
-rw-r--r-- | sys/sys/ktr.h | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 6e6c78a..f6eb921 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -103,6 +103,12 @@ __FBSDID("$FreeBSD$"); #include <machine/stdarg.h> +#if 0 +#define KTR_WITNESS KTR_SUBSYS +#else +#define KTR_WITNESS 0 +#endif + /* Easier to stay with the old names. */ #define lo_list lo_witness_data.lod_list #define lo_witness lo_witness_data.lod_witness diff --git a/sys/sys/ktr.h b/sys/sys/ktr.h index 4a996fc..3d6d98d 100644 --- a/sys/sys/ktr.h +++ b/sys/sys/ktr.h @@ -38,13 +38,18 @@ /* * Trace classes + * + * Two of the trace classes (KTR_DEV and KTR_SUBSYS) are special in that + * they are really placeholders so that indvidual drivers and subsystems + * can map their internal tracing to the general class when they wish to + * have tracing enabled and map it to 0 when they don't. */ #define KTR_GEN 0x00000001 /* General (TR) */ #define KTR_NET 0x00000002 /* Network */ #define KTR_DEV 0x00000004 /* Device driver */ #define KTR_LOCK 0x00000008 /* MP locking */ #define KTR_SMP 0x00000010 /* MP general */ -#define KTR_SPARE1 0x00000020 /* Unused */ +#define KTR_SUBSYS 0x00000020 /* Subsystem. */ #define KTR_PMAP 0x00000040 /* Pmap tracing */ #define KTR_MALLOC 0x00000080 /* Malloc tracing */ #define KTR_TRAP 0x00000100 /* Trap processing */ @@ -60,7 +65,7 @@ #define KTR_VFS 0x00040000 /* VFS events */ #define KTR_VOP 0x00080000 /* Auto-generated vop events */ #define KTR_VM 0x00100000 /* The virtual memory system */ -#define KTR_WITNESS 0x00200000 +#define KTR_SPARE1 0x00200000 /* Unused */ #define KTR_RUNQ 0x00400000 /* Run queue */ #define KTR_CONTENTION 0x00800000 /* Lock contention */ #define KTR_UMA 0x01000000 /* UMA slab allocator */ |