diff options
Diffstat (limited to 'include/trace/events/module.h')
-rw-r--r-- | include/trace/events/module.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index 84160fb18478..4b0f48ba16a6 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h | |||
@@ -51,7 +51,7 @@ TRACE_EVENT(module_free, | |||
51 | TP_printk("%s", __get_str(name)) | 51 | TP_printk("%s", __get_str(name)) |
52 | ); | 52 | ); |
53 | 53 | ||
54 | TRACE_EVENT(module_get, | 54 | DECLARE_EVENT_CLASS(module_refcnt, |
55 | 55 | ||
56 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), | 56 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), |
57 | 57 | ||
@@ -73,26 +73,18 @@ TRACE_EVENT(module_get, | |||
73 | __get_str(name), (void *)__entry->ip, __entry->refcnt) | 73 | __get_str(name), (void *)__entry->ip, __entry->refcnt) |
74 | ); | 74 | ); |
75 | 75 | ||
76 | TRACE_EVENT(module_put, | 76 | DEFINE_EVENT(module_refcnt, module_get, |
77 | 77 | ||
78 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), | 78 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), |
79 | 79 | ||
80 | TP_ARGS(mod, ip, refcnt), | 80 | TP_ARGS(mod, ip, refcnt) |
81 | ); | ||
81 | 82 | ||
82 | TP_STRUCT__entry( | 83 | DEFINE_EVENT(module_refcnt, module_put, |
83 | __field( unsigned long, ip ) | ||
84 | __field( int, refcnt ) | ||
85 | __string( name, mod->name ) | ||
86 | ), | ||
87 | 84 | ||
88 | TP_fast_assign( | 85 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), |
89 | __entry->ip = ip; | ||
90 | __entry->refcnt = refcnt; | ||
91 | __assign_str(name, mod->name); | ||
92 | ), | ||
93 | 86 | ||
94 | TP_printk("%s call_site=%pf refcnt=%d", | 87 | TP_ARGS(mod, ip, refcnt) |
95 | __get_str(name), (void *)__entry->ip, __entry->refcnt) | ||
96 | ); | 88 | ); |
97 | 89 | ||
98 | TRACE_EVENT(module_request, | 90 | TRACE_EVENT(module_request, |