aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index e0cbede96783..f95f8470dd38 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -925,15 +925,6 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
925 if (strcmp(call->system, TRACE_SYSTEM) != 0) 925 if (strcmp(call->system, TRACE_SYSTEM) != 0)
926 d_events = event_subsystem_dir(call->system, d_events); 926 d_events = event_subsystem_dir(call->system, d_events);
927 927
928 if (call->raw_init) {
929 ret = call->raw_init();
930 if (ret < 0) {
931 pr_warning("Could not initialize trace point"
932 " events/%s\n", call->name);
933 return ret;
934 }
935 }
936
937 call->dir = debugfs_create_dir(call->name, d_events); 928 call->dir = debugfs_create_dir(call->name, d_events);
938 if (!call->dir) { 929 if (!call->dir) {
939 pr_warning("Could not create debugfs " 930 pr_warning("Could not create debugfs "
@@ -1058,6 +1049,7 @@ static void trace_module_add_events(struct module *mod)
1058 struct ftrace_module_file_ops *file_ops = NULL; 1049 struct ftrace_module_file_ops *file_ops = NULL;
1059 struct ftrace_event_call *call, *start, *end; 1050 struct ftrace_event_call *call, *start, *end;
1060 struct dentry *d_events; 1051 struct dentry *d_events;
1052 int ret;
1061 1053
1062 start = mod->trace_events; 1054 start = mod->trace_events;
1063 end = mod->trace_events + mod->num_trace_events; 1055 end = mod->trace_events + mod->num_trace_events;
@@ -1073,7 +1065,15 @@ static void trace_module_add_events(struct module *mod)
1073 /* The linker may leave blanks */ 1065 /* The linker may leave blanks */
1074 if (!call->name) 1066 if (!call->name)
1075 continue; 1067 continue;
1076 1068 if (call->raw_init) {
1069 ret = call->raw_init();
1070 if (ret < 0) {
1071 if (ret != -ENOSYS)
1072 pr_warning("Could not initialize trace "
1073 "point events/%s\n", call->name);
1074 continue;
1075 }
1076 }
1077 /* 1077 /*
1078 * This module has events, create file ops for this module 1078 * This module has events, create file ops for this module
1079 * if not already done. 1079 * if not already done.
@@ -1225,6 +1225,15 @@ static __init int event_trace_init(void)
1225 /* The linker may leave blanks */ 1225 /* The linker may leave blanks */
1226 if (!call->name) 1226 if (!call->name)
1227 continue; 1227 continue;
1228 if (call->raw_init) {
1229 ret = call->raw_init();
1230 if (ret < 0) {
1231 if (ret != -ENOSYS)
1232 pr_warning("Could not initialize trace "
1233 "point events/%s\n", call->name);
1234 continue;
1235 }
1236 }
1228 list_add(&call->list, &ftrace_events); 1237 list_add(&call->list, &ftrace_events);
1229 event_create_dir(call, d_events, &ftrace_event_id_fops, 1238 event_create_dir(call, d_events, &ftrace_event_id_fops,
1230 &ftrace_enable_fops, &ftrace_event_filter_fops, 1239 &ftrace_enable_fops, &ftrace_event_filter_fops,