]> asedeno.scripts.mit.edu Git - linux.git/blob - include/trace/events/initcall.h
init, tracing: Add initcall trace events
[linux.git] / include / trace / events / initcall.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM initcall
4
5 #if !defined(_TRACE_INITCALL_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_INITCALL_H
7
8 #include <linux/tracepoint.h>
9
10 TRACE_EVENT(initcall_level,
11
12         TP_PROTO(const char *level),
13
14         TP_ARGS(level),
15
16         TP_STRUCT__entry(
17                 __string(level, level)
18         ),
19
20         TP_fast_assign(
21                 __assign_str(level, level);
22         ),
23
24         TP_printk("level=%s", __get_str(level))
25 );
26
27 TRACE_EVENT(initcall_start,
28
29         TP_PROTO(initcall_t func),
30
31         TP_ARGS(func),
32
33         TP_STRUCT__entry(
34                 __field(initcall_t, func)
35         ),
36
37         TP_fast_assign(
38                 __entry->func = func;
39         ),
40
41         TP_printk("func=%pS", __entry->func)
42 );
43
44 TRACE_EVENT(initcall_finish,
45
46         TP_PROTO(initcall_t func, int ret),
47
48         TP_ARGS(func, ret),
49
50         TP_STRUCT__entry(
51                 __field(initcall_t,     func)
52                 __field(int,            ret)
53         ),
54
55         TP_fast_assign(
56                 __entry->func = func;
57                 __entry->ret = ret;
58         ),
59
60         TP_printk("func=%pS ret=%d", __entry->func, __entry->ret)
61 );
62
63 #endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */
64
65 /* This part must be outside protection */
66 #include <trace/define_trace.h>