summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-04-20 11:46:03 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-04-20 22:06:48 -0400
commit2290f2c589285d0031e3b7445afff8949f3fdbb6 (patch)
tree98f8e9db7a57eadcaf517404e0f5712b0a204461 /kernel/trace/trace_functions.c
parentcab5037950821caa1301df0223de657c6ee202a8 (diff)
downloadop-kernel-dev-2290f2c589285d0031e3b7445afff8949f3fdbb6.zip
op-kernel-dev-2290f2c589285d0031e3b7445afff8949f3fdbb6.tar.gz
tracing/ftrace: Allow for the traceonoff probe be unique to instances
Have the traceon/off function probe triggers affect only the instance they are set in. This required making the trace_on/off accessible for other files in the tracing directory. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r--kernel/trace/trace_functions.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
index 7775e1ca..8c30ca7 100644
--- a/kernel/trace/trace_functions.c
+++ b/kernel/trace/trace_functions.c
@@ -268,7 +268,8 @@ static struct tracer function_trace __tracer_data =
#ifdef CONFIG_DYNAMIC_FTRACE
static void update_traceon_count(struct ftrace_probe_ops *ops,
- unsigned long ip, bool on,
+ unsigned long ip,
+ struct trace_array *tr, bool on,
void *data)
{
struct ftrace_func_mapper *mapper = data;
@@ -313,13 +314,13 @@ static void update_traceon_count(struct ftrace_probe_ops *ops,
/* Make sure we see count before checking tracing state */
smp_rmb();
- if (on == !!tracing_is_on())
+ if (on == !!tracer_tracing_is_on(tr))
return;
if (on)
- tracing_on();
+ tracer_tracing_on(tr);
else
- tracing_off();
+ tracer_tracing_off(tr);
/* Make sure tracing state is visible before updating count */
smp_wmb();
@@ -332,7 +333,7 @@ ftrace_traceon_count(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
{
- update_traceon_count(ops, ip, 1, data);
+ update_traceon_count(ops, ip, tr, 1, data);
}
static void
@@ -340,7 +341,7 @@ ftrace_traceoff_count(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
{
- update_traceon_count(ops, ip, 0, data);
+ update_traceon_count(ops, ip, tr, 0, data);
}
static void
@@ -348,10 +349,10 @@ ftrace_traceon(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
{
- if (tracing_is_on())
+ if (tracer_tracing_is_on(tr))
return;
- tracing_on();
+ tracer_tracing_on(tr);
}
static void
@@ -359,10 +360,10 @@ ftrace_traceoff(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
{
- if (!tracing_is_on())
+ if (!tracer_tracing_is_on(tr))
return;
- tracing_off();
+ tracer_tracing_off(tr);
}
/*
OpenPOWER on IntegriCloud