summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_export.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-05-10 21:55:43 +0200
committerSteven Rostedt <rostedt@goodmis.org>2012-05-10 21:55:43 +0200
commit9b63776fa3ca96c4ecda76f6fa947b7b0add66ac (patch)
treeac90f2faceecab78d7d547c33daef31d4a9e2943 /kernel/trace/trace_export.c
parentperf stat: handle ENXIO error for perf_event_open (diff)
downloadlinux-9b63776fa3ca96c4ecda76f6fa947b7b0add66ac.tar.xz
linux-9b63776fa3ca96c4ecda76f6fa947b7b0add66ac.zip
tracing: Do not enable function event with enable
With the adding of function tracing event to perf, it caused a side effect that produces the following warning when enabling all events in ftrace: # echo 1 > /sys/kernel/debug/tracing/events/enable [console] event trace: Could not enable event function This is because when enabling all events via the debugfs system it ignores events that do not have a ->reg() function assigned. This was to skip over the ftrace internal events (as they are not TRACE_EVENTs). But as the ftrace function event now has a ->reg() function attached to it for use with perf, it is no longer ignored. Worse yet, this ->reg() function is being called when it should not be. It returns an error and causes the above warning to be printed. By adding a new event_call flag (TRACE_EVENT_FL_IGNORE_ENABLE) and have all ftrace internel event structures have it set, setting the events/enable will no longe try to incorrectly enable the function event and does not warn. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_export.c')
-rw-r--r--kernel/trace/trace_export.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 3dd15e8bc856..e039906b037d 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -180,6 +180,7 @@ struct ftrace_event_call __used event_##call = { \
.event.type = etype, \
.class = &event_class_ftrace_##call, \
.print_fmt = print, \
+ .flags = TRACE_EVENT_FL_IGNORE_ENABLE, \
}; \
struct ftrace_event_call __used \
__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;