As part of commit f45d1225adb0 ("tracing: Kernel access to Ftrace
instances") ftrace_set_clr_event was exported, but for other kernel
modules to use the function, we require the following additional changes
1. Removing the static keyword for this newly exported function.
2. Declaring it in the header file - include/linux/trace_events.h
Signed-off-by: Divya Indi <[email protected]>
Reviewed-By: Aruna Ramakrishna <[email protected]>
---
include/linux/trace_events.h | 1 +
kernel/trace/trace_events.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 8a62731..0f874fb 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -540,6 +540,7 @@ extern int trace_define_field(struct trace_event_call *call, const char *type,
#define is_signed_type(type) (((type)(-1)) < (type)1)
int trace_set_clr_event(const char *system, const char *event, int set);
+int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
/*
* The double __builtin_constant_p is because gcc will give us an error
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 0ce3db6..b6b4618 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -795,7 +795,7 @@ static int __ftrace_set_clr_event(struct trace_array *tr, const char *match,
return ret;
}
-static int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
+int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
{
char *event = NULL, *sub = NULL, *match;
int ret;
--
1.8.3.1