File: boot.h

package info (click to toggle)
linux-2.6 2.6.32-48squeeze6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 492,732 kB
  • ctags: 1,415,173
  • sloc: ansic: 7,636,125; asm: 225,072; xml: 32,978; makefile: 19,313; perl: 11,533; sh: 3,561; cpp: 3,365; yacc: 2,964; python: 2,893; lex: 1,824; lisp: 218; pascal: 116; awk: 109; sed: 30
file content (60 lines) | stat: -rw-r--r-- 1,576 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _LINUX_TRACE_BOOT_H
#define _LINUX_TRACE_BOOT_H

#include <linux/module.h>
#include <linux/kallsyms.h>
#include <linux/init.h>

/*
 * Structure which defines the trace of an initcall
 * while it is called.
 * You don't have to fill the func field since it is
 * only used internally by the tracer.
 */
struct boot_trace_call {
	pid_t			caller;
	char			func[KSYM_SYMBOL_LEN];
};

/*
 * Structure which defines the trace of an initcall
 * while it returns.
 */
struct boot_trace_ret {
	char			func[KSYM_SYMBOL_LEN];
	int				result;
	unsigned long long	duration;		/* nsecs */
};

#ifdef CONFIG_BOOT_TRACER
/* Append the traces on the ring-buffer */
extern void trace_boot_call(struct boot_trace_call *bt, initcall_t fn);
extern void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn);

/* Tells the tracer that smp_pre_initcall is finished.
 * So we can start the tracing
 */
extern void start_boot_trace(void);

/* Resume the tracing of other necessary events
 * such as sched switches
 */
extern void enable_boot_trace(void);

/* Suspend this tracing. Actually, only sched_switches tracing have
 * to be suspended. Initcalls doesn't need it.)
 */
extern void disable_boot_trace(void);
#else
static inline
void trace_boot_call(struct boot_trace_call *bt, initcall_t fn) { }

static inline
void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn) { }

static inline void start_boot_trace(void) { }
static inline void enable_boot_trace(void) { }
static inline void disable_boot_trace(void) { }
#endif /* CONFIG_BOOT_TRACER */

#endif /* __LINUX_TRACE_BOOT_H */