i2c: mxs: use MXS_DMA_CTRL_WAIT4END instead of DMA_CTRL_ACK
[linux/fpc-iii.git] / include / trace / events / module.h
blob097485c73c01d44a4aff950534e6207395a54eb3
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Because linux/module.h has tracepoints in the header, and ftrace.h
4 * used to include this file, define_trace.h includes linux/module.h
5 * But we do not want the module.h to override the TRACE_SYSTEM macro
6 * variable that define_trace.h is processing, so we only set it
7 * when module events are being processed, which would happen when
8 * CREATE_TRACE_POINTS is defined.
9 */
10 #ifdef CREATE_TRACE_POINTS
11 #undef TRACE_SYSTEM
12 #define TRACE_SYSTEM module
13 #endif
15 #if !defined(_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ)
16 #define _TRACE_MODULE_H
18 #include <linux/tracepoint.h>
20 #ifdef CONFIG_MODULES
22 struct module;
24 #define show_module_flags(flags) __print_flags(flags, "", \
25 { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \
26 { (1UL << TAINT_OOT_MODULE), "O" }, \
27 { (1UL << TAINT_FORCED_MODULE), "F" }, \
28 { (1UL << TAINT_CRAP), "C" }, \
29 { (1UL << TAINT_UNSIGNED_MODULE), "E" })
31 TRACE_EVENT(module_load,
33 TP_PROTO(struct module *mod),
35 TP_ARGS(mod),
37 TP_STRUCT__entry(
38 __field( unsigned int, taints )
39 __string( name, mod->name )
42 TP_fast_assign(
43 __entry->taints = mod->taints;
44 __assign_str(name, mod->name);
47 TP_printk("%s %s", __get_str(name), show_module_flags(__entry->taints))
50 TRACE_EVENT(module_free,
52 TP_PROTO(struct module *mod),
54 TP_ARGS(mod),
56 TP_STRUCT__entry(
57 __string( name, mod->name )
60 TP_fast_assign(
61 __assign_str(name, mod->name);
64 TP_printk("%s", __get_str(name))
67 #ifdef CONFIG_MODULE_UNLOAD
68 /* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */
70 DECLARE_EVENT_CLASS(module_refcnt,
72 TP_PROTO(struct module *mod, unsigned long ip),
74 TP_ARGS(mod, ip),
76 TP_STRUCT__entry(
77 __field( unsigned long, ip )
78 __field( int, refcnt )
79 __string( name, mod->name )
82 TP_fast_assign(
83 __entry->ip = ip;
84 __entry->refcnt = atomic_read(&mod->refcnt);
85 __assign_str(name, mod->name);
88 TP_printk("%s call_site=%ps refcnt=%d",
89 __get_str(name), (void *)__entry->ip, __entry->refcnt)
92 DEFINE_EVENT(module_refcnt, module_get,
94 TP_PROTO(struct module *mod, unsigned long ip),
96 TP_ARGS(mod, ip)
99 DEFINE_EVENT(module_refcnt, module_put,
101 TP_PROTO(struct module *mod, unsigned long ip),
103 TP_ARGS(mod, ip)
105 #endif /* CONFIG_MODULE_UNLOAD */
107 TRACE_EVENT(module_request,
109 TP_PROTO(char *name, bool wait, unsigned long ip),
111 TP_ARGS(name, wait, ip),
113 TP_STRUCT__entry(
114 __field( unsigned long, ip )
115 __field( bool, wait )
116 __string( name, name )
119 TP_fast_assign(
120 __entry->ip = ip;
121 __entry->wait = wait;
122 __assign_str(name, name);
125 TP_printk("%s wait=%d call_site=%ps",
126 __get_str(name), (int)__entry->wait, (void *)__entry->ip)
129 #endif /* CONFIG_MODULES */
131 #endif /* _TRACE_MODULE_H */
133 /* This part must be outside protection */
134 #include <trace/define_trace.h>