]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix showing function event in available_events
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 24 Feb 2016 14:04:24 +0000 (09:04 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 24 Feb 2016 14:17:11 +0000 (09:17 -0500)
commitba4ca7a28b2e981cd121ff4d955c0f4409a439f0
treec5fcd06e2cd139149bad94b63986be7bcfeaaa1c
parent4042f25c04375adf38fe17cd5add2e6dd260d86a
tracing: Fix showing function event in available_events

The ftrace:function event is only displayed for parsing the function tracer
data. It is not used to enable function tracing, and does not include an
"enable" file in its event directory.

Originally, this event was kept separate from other events because it did
not have a ->reg parameter. But perf added a "reg" parameter for its use
which caused issues, because it made the event available to functions where
it was not compatible for.

Commit 2befe09719a1d "tracing: Do not enable function event with enable"
added a TRACE_EVENT_FL_IGNORE_ENABLE flag that prevented the function event
from being enabled by normal trace events. But this commit missed keeping
the function event from being displayed by the "available_events" directory,
which is used to show what events can be enabled by set_event.

One documented way to enable all events is to:

 cat available_events > set_event

But because the function event is displayed in the available_events, this
now causes an INVALID error:

 cat: write error: Invalid argument

Reported-by: Chunyu Hu <chuhu@redhat.com>
Fixes: 2befe09719a1d "tracing: Do not enable function event with enable"
Cc: stable@vger.kernel.org # 3.4+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c