return event;
}
-static void tracer_tracing_on(struct trace_array *tr)
+void tracer_tracing_on(struct trace_array *tr)
{
if (tr->trace_buffer.buffer)
ring_buffer_record_on(tr->trace_buffer.buffer);
EXPORT_SYMBOL_GPL(tracing_snapshot_alloc);
#endif /* CONFIG_TRACER_SNAPSHOT */
-static void tracer_tracing_off(struct trace_array *tr)
+void tracer_tracing_off(struct trace_array *tr)
{
if (tr->trace_buffer.buffer)
ring_buffer_record_off(tr->trace_buffer.buffer);
int tracing_open_generic(struct inode *inode, struct file *filp);
bool tracing_is_disabled(void);
int tracer_tracing_is_on(struct trace_array *tr);
+void tracer_tracing_on(struct trace_array *tr);
+void tracer_tracing_off(struct trace_array *tr);
struct dentry *trace_create_file(const char *name,
umode_t mode,
struct dentry *parent,
#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;
/* 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();
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
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
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
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);
}
/*