diff options
| author | Li Zefan <lizf@cn.fujitsu.com> | 2010-03-23 22:57:43 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-03-31 22:56:58 -0400 |
| commit | ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e (patch) | |
| tree | cf754c5242e66aa0349559af880db5fa29af6f2a /include/trace | |
| parent | 50354a8a28d0c91695a2d6d25b5a821bfe557a07 (diff) | |
tracing: Remove side effect from module tracepoints that caused a GPF
Remove the @refcnt argument, because it has side-effects, and arguments with
side-effects are not skipped by the jump over disabled instrumentation and are
executed even when the tracepoint is disabled.
This was also causing a GPF as found by Randy Dunlap:
Subject: 2.6.33 GP fault only when built with tracing
LKML-Reference: <4BA2B69D.3000309@oracle.com>
Note, the current 2.6.34-rc has a fix for the actual cause of the GPF,
but this fixes one of its triggers.
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4BA97FA7.6040406@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/module.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index 4b0f48ba16a6..a585f8135bd9 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h | |||
| @@ -53,9 +53,9 @@ TRACE_EVENT(module_free, | |||
| 53 | 53 | ||
| 54 | DECLARE_EVENT_CLASS(module_refcnt, | 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), |
| 57 | 57 | ||
| 58 | TP_ARGS(mod, ip, refcnt), | 58 | TP_ARGS(mod, ip), |
| 59 | 59 | ||
| 60 | TP_STRUCT__entry( | 60 | TP_STRUCT__entry( |
| 61 | __field( unsigned long, ip ) | 61 | __field( unsigned long, ip ) |
| @@ -65,7 +65,7 @@ DECLARE_EVENT_CLASS(module_refcnt, | |||
| 65 | 65 | ||
| 66 | TP_fast_assign( | 66 | TP_fast_assign( |
| 67 | __entry->ip = ip; | 67 | __entry->ip = ip; |
| 68 | __entry->refcnt = refcnt; | 68 | __entry->refcnt = __this_cpu_read(mod->refptr->count); |
| 69 | __assign_str(name, mod->name); | 69 | __assign_str(name, mod->name); |
| 70 | ), | 70 | ), |
| 71 | 71 | ||
| @@ -75,16 +75,16 @@ DECLARE_EVENT_CLASS(module_refcnt, | |||
| 75 | 75 | ||
| 76 | DEFINE_EVENT(module_refcnt, module_get, | 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), |
| 79 | 79 | ||
| 80 | TP_ARGS(mod, ip, refcnt) | 80 | TP_ARGS(mod, ip) |
| 81 | ); | 81 | ); |
| 82 | 82 | ||
| 83 | DEFINE_EVENT(module_refcnt, module_put, | 83 | DEFINE_EVENT(module_refcnt, module_put, |
| 84 | 84 | ||
| 85 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), | 85 | TP_PROTO(struct module *mod, unsigned long ip), |
| 86 | 86 | ||
| 87 | TP_ARGS(mod, ip, refcnt) | 87 | TP_ARGS(mod, ip) |
| 88 | ); | 88 | ); |
| 89 | 89 | ||
| 90 | TRACE_EVENT(module_request, | 90 | TRACE_EVENT(module_request, |
