|
@@ -893,7 +893,7 @@ int __trace_bputs(unsigned long ip, const char *str)
|
|
|
EXPORT_SYMBOL_GPL(__trace_bputs);
|
|
|
|
|
|
#ifdef CONFIG_TRACER_SNAPSHOT
|
|
|
-static void tracing_snapshot_instance(struct trace_array *tr)
|
|
|
+void tracing_snapshot_instance(struct trace_array *tr)
|
|
|
{
|
|
|
struct tracer *tracer = tr->current_trace;
|
|
|
unsigned long flags;
|
|
@@ -949,7 +949,7 @@ static int resize_buffer_duplicate_size(struct trace_buffer *trace_buf,
|
|
|
struct trace_buffer *size_buf, int cpu_id);
|
|
|
static void set_buffer_entries(struct trace_buffer *buf, unsigned long val);
|
|
|
|
|
|
-static int alloc_snapshot(struct trace_array *tr)
|
|
|
+int tracing_alloc_snapshot_instance(struct trace_array *tr)
|
|
|
{
|
|
|
int ret;
|
|
|
|
|
@@ -995,7 +995,7 @@ int tracing_alloc_snapshot(void)
|
|
|
struct trace_array *tr = &global_trace;
|
|
|
int ret;
|
|
|
|
|
|
- ret = alloc_snapshot(tr);
|
|
|
+ ret = tracing_alloc_snapshot_instance(tr);
|
|
|
WARN_ON(ret < 0);
|
|
|
|
|
|
return ret;
|
|
@@ -5408,7 +5408,7 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
|
|
|
|
|
|
#ifdef CONFIG_TRACER_MAX_TRACE
|
|
|
if (t->use_max_tr && !had_max_tr) {
|
|
|
- ret = alloc_snapshot(tr);
|
|
|
+ ret = tracing_alloc_snapshot_instance(tr);
|
|
|
if (ret < 0)
|
|
|
goto out;
|
|
|
}
|
|
@@ -6451,7 +6451,7 @@ tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt,
|
|
|
}
|
|
|
#endif
|
|
|
if (!tr->allocated_snapshot) {
|
|
|
- ret = alloc_snapshot(tr);
|
|
|
+ ret = tracing_alloc_snapshot_instance(tr);
|
|
|
if (ret < 0)
|
|
|
break;
|
|
|
}
|
|
@@ -7179,7 +7179,7 @@ ftrace_trace_snapshot_callback(struct trace_array *tr, struct ftrace_hash *hash,
|
|
|
return ret;
|
|
|
|
|
|
out_reg:
|
|
|
- ret = alloc_snapshot(tr);
|
|
|
+ ret = tracing_alloc_snapshot_instance(tr);
|
|
|
if (ret < 0)
|
|
|
goto out;
|
|
|
|