Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191023
b: refs/heads/master
c: ae832d1
h: refs/heads/master
i:
  191021: 2449b58
  191019: ef3f1c5
  191015: 593e87c
  191007: 310f480
v: v3
  • Loading branch information
Li Zefan authored and Steven Rostedt committed Apr 1, 2010
1 parent 4b30f2a commit c80c2f1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50354a8a28d0c91695a2d6d25b5a821bfe557a07
refs/heads/master: ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e
6 changes: 2 additions & 4 deletions trunk/include/linux/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand All @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions trunk/include/trace/events/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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);
),

Expand All @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c80c2f1

Please sign in to comment.