From c80c2f11181612c30e0439857327788c9626ed10 Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Wed, 24 Mar 2010 10:57:43 +0800 Subject: [PATCH] --- yaml --- r: 191023 b: refs/heads/master c: ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e h: refs/heads/master i: 191021: 2449b585369a364056b356c108b8a8b97224deb1 191019: ef3f1c527e9188a13b6d1255aebb4008251ffe60 191015: 593e87cc5f010c3e8d3ad2d359b509914596adfb 191007: 310f4809912bb3a94a9c4961c7062f9f4a5c891c v: v3 --- [refs] | 2 +- trunk/include/linux/module.h | 6 ++---- trunk/include/trace/events/module.h | 14 +++++++------- trunk/kernel/module.c | 3 +-- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index bf533c2c98e8..9a3f17a42aab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 50354a8a28d0c91695a2d6d25b5a821bfe557a07 +refs/heads/master: ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e diff --git a/trunk/include/linux/module.h b/trunk/include/linux/module.h index 5e869ffd34aa..393ec39b580a 100644 --- a/trunk/include/linux/module.h +++ b/trunk/include/linux/module.h @@ -460,8 +460,7 @@ static inline void __module_get(struct module *module) if (module) { preempt_disable(); __this_cpu_inc(module->refptr->count); - trace_module_get(module, _THIS_IP_, - __this_cpu_read(module->refptr->count)); + trace_module_get(module, _THIS_IP_); preempt_enable(); } } @@ -475,8 +474,7 @@ static inline int try_module_get(struct module *module) if (likely(module_is_live(module))) { __this_cpu_inc(module->refptr->count); - trace_module_get(module, _THIS_IP_, - __this_cpu_read(module->refptr->count)); + trace_module_get(module, _THIS_IP_); } else ret = 0; diff --git a/trunk/include/trace/events/module.h b/trunk/include/trace/events/module.h index 4b0f48ba16a6..a585f8135bd9 100644 --- a/trunk/include/trace/events/module.h +++ b/trunk/include/trace/events/module.h @@ -53,9 +53,9 @@ TRACE_EVENT(module_free, 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 +65,7 @@ DECLARE_EVENT_CLASS(module_refcnt, TP_fast_assign( __entry->ip = ip; - __entry->refcnt = refcnt; + __entry->refcnt = __this_cpu_read(mod->refptr->count); __assign_str(name, mod->name); ), @@ -75,16 +75,16 @@ 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) ); TRACE_EVENT(module_request, diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index c968d3606dca..21591ad921f3 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -800,8 +800,7 @@ void module_put(struct module *module) preempt_disable(); __this_cpu_dec(module->refptr->count); - trace_module_put(module, _RET_IP_, - __this_cpu_read(module->refptr->count)); + trace_module_put(module, _RET_IP_); /* Maybe they're waiting for us to drop reference? */ if (unlikely(!module_is_live(module))) wake_up_process(module->waiter);