|
@@ -2473,8 +2473,9 @@ __trace_add_event_dirs(struct trace_array *tr)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/* Returns any file that matches the system and event */
|
|
|
struct trace_event_file *
|
|
|
-find_event_file(struct trace_array *tr, const char *system, const char *event)
|
|
|
+__find_event_file(struct trace_array *tr, const char *system, const char *event)
|
|
|
{
|
|
|
struct trace_event_file *file;
|
|
|
struct trace_event_call *call;
|
|
@@ -2485,10 +2486,7 @@ find_event_file(struct trace_array *tr, const char *system, const char *event)
|
|
|
call = file->event_call;
|
|
|
name = trace_event_name(call);
|
|
|
|
|
|
- if (!name || !call->class || !call->class->reg)
|
|
|
- continue;
|
|
|
-
|
|
|
- if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)
|
|
|
+ if (!name || !call->class)
|
|
|
continue;
|
|
|
|
|
|
if (strcmp(event, name) == 0 &&
|
|
@@ -2498,6 +2496,20 @@ find_event_file(struct trace_array *tr, const char *system, const char *event)
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
+/* Returns valid trace event files that match system and event */
|
|
|
+struct trace_event_file *
|
|
|
+find_event_file(struct trace_array *tr, const char *system, const char *event)
|
|
|
+{
|
|
|
+ struct trace_event_file *file;
|
|
|
+
|
|
|
+ file = __find_event_file(tr, system, event);
|
|
|
+ if (!file || !file->event_call->class->reg ||
|
|
|
+ file->event_call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)
|
|
|
+ return NULL;
|
|
|
+
|
|
|
+ return file;
|
|
|
+}
|
|
|
+
|
|
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
|
|
|
|
|
/* Avoid typos */
|