diff options
author | Robert Richter <robert.richter@amd.com> | 2010-04-23 16:47:51 +0200 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-04-23 16:47:51 +0200 |
commit | b971f06187d83b5c03d2b597cccdfef421c0ca91 (patch) | |
tree | 849dbe485ca9472bea002f94681882ce103fe3cd /include/trace/events/module.h | |
parent | cb6e943ccf19ab6d3189147e9d625a992e016084 (diff) | |
parent | c1ab9cab75098924fa8226a8a371de66977439df (diff) |
Merge commit 'tip/tracing/core' into oprofile/core
Conflicts:
drivers/oprofile/cpu_buffer.c
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'include/trace/events/module.h')
-rw-r--r-- | include/trace/events/module.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index 4b0f48ba16a6..c7bb2f0482fe 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h @@ -51,11 +51,14 @@ TRACE_EVENT(module_free, TP_printk("%s", __get_str(name)) ); +#ifdef CONFIG_MODULE_UNLOAD +/* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ + DECLARE_EVENT_CLASS(module_refcnt, - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), + TP_PROTO(struct module *mod, unsigned long ip), - TP_ARGS(mod, ip, refcnt), + TP_ARGS(mod, ip), TP_STRUCT__entry( __field( unsigned long, ip ) @@ -65,7 +68,7 @@ DECLARE_EVENT_CLASS(module_refcnt, TP_fast_assign( __entry->ip = ip; - __entry->refcnt = refcnt; + __entry->refcnt = __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs); __assign_str(name, mod->name); ), @@ -75,17 +78,18 @@ DECLARE_EVENT_CLASS(module_refcnt, DEFINE_EVENT(module_refcnt, module_get, - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), + TP_PROTO(struct module *mod, unsigned long ip), - TP_ARGS(mod, ip, refcnt) + TP_ARGS(mod, ip) ); DEFINE_EVENT(module_refcnt, module_put, - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), + TP_PROTO(struct module *mod, unsigned long ip), - TP_ARGS(mod, ip, refcnt) + TP_ARGS(mod, ip) ); +#endif /* CONFIG_MODULE_UNLOAD */ TRACE_EVENT(module_request, |