summaryrefslogtreecommitdiff
path: root/release/src/linux/linux/include/linux/ktrace.h
blob: 7548ff2b07f045480d9339ae4311390653051485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Simple kernel trace
 * $Id: ktrace.h,v 1.1.1.4 2003/10/14 08:09:25 sparq Exp $
 */

#ifndef _LINUX_KTRACE_H
#define _LINUX_KTRACE_H

#include <linux/config.h>

#ifdef CONFIG_KTRACE

/* kernel subsystems */
#define	KT_SYSCALL	0x1
#define	KT_TRAP		0x2
#define	KT_PROC		0x4
#define	KT_IRQ		0x8
#define	KT_MM		0x10
#define	KT_SOCK		0x20
#define	KT_NET		0x40
#define	KT_FS		0x80

extern int ktracectl;
extern void _ktrace(char *fmt, unsigned long a1, unsigned long a2);

#define	ktrace(subsys, fmt, a1, a2)	if ((subsys) & ktracectl) _ktrace(fmt, (unsigned long)a1, (unsigned long)a2)

#else
#define	ktrace(subsys, fmt, a1, a2)
#endif	/* CONFIG_KTRACE */

#endif	/* _LINUX_KTRACE_H */