]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/sys/ktr_class.h
zfs: merge openzfs/zfs@a382e2119
[FreeBSD/FreeBSD.git] / sys / sys / ktr_class.h
1 /*-
2  * SPDX-License-Identifier: BSD-3-Clause
3  *
4  * Copyright (c) 1996 Berkeley Software Design, Inc. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. Berkeley Software Design Inc's name may not be used to endorse or
15  *    promote products derived from this software without specific prior
16  *    written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND
19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED.  IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28  * SUCH DAMAGE.
29  *
30  *      from BSDI $Id: ktr.h,v 1.10.2.7 2000/03/16 21:44:42 cp Exp $
31  */
32
33 #ifndef _SYS_KTR_CLASS_H_
34 #define _SYS_KTR_CLASS_H_
35
36 /*
37  * KTR trace classes
38  *
39  * Two of the trace classes (KTR_DEV and KTR_SUBSYS) are special in that
40  * they are really placeholders so that indvidual drivers and subsystems
41  * can map their internal tracing to the general class when they wish to
42  * have tracing enabled and map it to 0 when they don't.
43  */
44 #define KTR_GEN         0x00000001              /* General (TR) */
45 #define KTR_NET         0x00000002              /* Network */
46 #define KTR_DEV         0x00000004              /* Device driver */
47 #define KTR_LOCK        0x00000008              /* MP locking */
48 #define KTR_SMP         0x00000010              /* MP general */
49 #define KTR_SUBSYS      0x00000020              /* Subsystem. */
50 #define KTR_PMAP        0x00000040              /* Pmap tracing */
51 #define KTR_MALLOC      0x00000080              /* Malloc tracing */
52 #define KTR_TRAP        0x00000100              /* Trap processing */
53 #define KTR_INTR        0x00000200              /* Interrupt tracing */
54 #define KTR_SIG         0x00000400              /* Signal processing */
55 #define KTR_SPARE2      0x00000800              /* cxgb, amd64, xen, clk, &c */
56 #define KTR_PROC        0x00001000              /* Process scheduling */
57 #define KTR_SYSC        0x00002000              /* System call */
58 #define KTR_INIT        0x00004000              /* System initialization */
59 #define KTR_SPARE3      0x00008000              /* cxgb, drm2, ioat, ntb */
60 #define KTR_SPARE4      0x00010000
61 #define KTR_EVH         0x00020000              /* Eventhandler */
62 #define KTR_VFS         0x00040000              /* VFS events */
63 #define KTR_VOP         0x00080000              /* Auto-generated vop events */
64 #define KTR_VM          0x00100000              /* The virtual memory system */
65 #define KTR_INET        0x00200000              /* IPv4 stack */
66 #define KTR_RUNQ        0x00400000              /* Run queue */
67 #define KTR_SPARE5      0x00800000
68 #define KTR_UMA         0x01000000              /* UMA slab allocator */
69 #define KTR_CALLOUT     0x02000000              /* Callouts and timeouts */
70 #define KTR_GEOM        0x04000000              /* GEOM I/O events */
71 #define KTR_BUSDMA      0x08000000              /* busdma(9) events */
72 #define KTR_INET6       0x10000000              /* IPv6 stack */
73 #define KTR_SCHED       0x20000000              /* Machine parsed sched info. */
74 #define KTR_BUF         0x40000000              /* Buffer cache */
75 #define KTR_PTRACE      0x80000000              /* Process debugging. */
76 #define KTR_ALL         0xffffffff
77
78 /* KTR trace classes to compile in */
79 #ifdef KTR
80 #ifndef KTR_COMPILE
81 #define KTR_COMPILE     (KTR_ALL)
82 #endif
83 #else   /* !KTR */
84 #undef KTR_COMPILE
85 #define KTR_COMPILE 0
86 #endif  /* KTR */
87
88 #endif /* !_SYS_KTR_CLASS_H_ */