aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-03-26 02:24:34 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-26 04:13:14 -0400
commit9a8118baaeb0eaa148913bed77bf9c6335f6ca63 (patch)
tree8e30ac89e7db4472478ec9a2bcd803fd0f22bad3 /kernel
parent9f58a159d022c8f2533a27708aa267adf4f0e3ce (diff)
tracing: filter fix for TRACE_EVENT_FORMAT events
Impact: fix crash (hang) when using TRACE_EVENT_FORMAT filter files filters are only hooked up to the tracepoint events defined using TRACE_EVENT but not the tracers that use TRACE_EVENT_FORMAT, such as ftrace. Do not display the filter files at all for TRACE_EVENT_FORMAT events for the time being. Cc: Steven Rostedt <rostedt@goodmis.org> Cc: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Weisbecker <fweisbec@gmail.com> LKML-Reference: <1237878882.8339.61.camel@charm-linux> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_events.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index d132997ab756..64ec4d278ffb 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -680,7 +680,6 @@ static struct dentry *
680event_subsystem_dir(const char *name, struct dentry *d_events) 680event_subsystem_dir(const char *name, struct dentry *d_events)
681{ 681{
682 struct event_subsystem *system; 682 struct event_subsystem *system;
683 struct dentry *entry;
684 683
685 /* First see if we did not already create this dir */ 684 /* First see if we did not already create this dir */
686 list_for_each_entry(system, &event_subsystems, list) { 685 list_for_each_entry(system, &event_subsystems, list) {
@@ -709,12 +708,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
709 708
710 system->preds = NULL; 709 system->preds = NULL;
711 710
712 entry = debugfs_create_file("filter", 0644, system->entry, system,
713 &ftrace_subsystem_filter_fops);
714 if (!entry)
715 pr_warning("Could not create debugfs "
716 "'%s/filter' entry\n", name);
717
718 return system->entry; 711 return system->entry;
719} 712}
720 713
@@ -770,14 +763,13 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events)
770 " events/%s\n", call->name); 763 " events/%s\n", call->name);
771 return ret; 764 return ret;
772 } 765 }
766 entry = debugfs_create_file("filter", 0644, call->dir, call,
767 &ftrace_event_filter_fops);
768 if (!entry)
769 pr_warning("Could not create debugfs "
770 "'%s/filter' entry\n", call->name);
773 } 771 }
774 772
775 entry = debugfs_create_file("filter", 0644, call->dir, call,
776 &ftrace_event_filter_fops);
777 if (!entry)
778 pr_warning("Could not create debugfs "
779 "'%s/filter' entry\n", call->name);
780
781 /* A trace may not want to export its format */ 773 /* A trace may not want to export its format */
782 if (!call->show_format) 774 if (!call->show_format)
783 return 0; 775 return 0;