summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-06-28 12:24:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-06-28 12:24:43 -0700
commit5904b3b81d25166e5e39b9727645bb47937618e3 (patch)
tree2a306f8b0cdea354b3ebc157623dededcf471091 /kernel
parentf3866db8f7534ba8bbb342bebcf5ede542035528 (diff)
parentb70e4f0529c089b00d0a6da13106db4de1ada4c7 (diff)
downloadlinux-5904b3b81d25166e5e39b9727645bb47937618e3.tar.gz
linux-5904b3b81d25166e5e39b9727645bb47937618e3.tar.bz2
linux-5904b3b81d25166e5e39b9727645bb47937618e3.zip
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: tracing: Fix undeclared ENOSYS in include/linux/tracepoint.h perf record: prevent kill(0, SIGTERM); perf session: Remove threads from tree on PERF_RECORD_EXIT perf/tracing: Fix regression of perf losing kprobe events perf_events: Fix Intel Westmere event constraints perf record: Don't call newt functions when not initialized
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_event_perf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
index e6f65887842c..8a2b73f7c068 100644
--- a/kernel/trace/trace_event_perf.c
+++ b/kernel/trace/trace_event_perf.c
@@ -96,7 +96,9 @@ int perf_trace_init(struct perf_event *p_event)
mutex_lock(&event_mutex);
list_for_each_entry(tp_event, &ftrace_events, list) {
if (tp_event->event.type == event_id &&
- tp_event->class && tp_event->class->perf_probe &&
+ tp_event->class &&
+ (tp_event->class->perf_probe ||
+ tp_event->class->reg) &&
try_module_get(tp_event->mod)) {
ret = perf_trace_event_init(tp_event, p_event);
break;