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();
}
}
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;
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 )
TP_fast_assign(
__entry->ip = ip;
- __entry->refcnt = refcnt;
+ __entry->refcnt = __this_cpu_read(mod->refptr->count);
__assign_str(name, mod->name);
),
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,
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);