diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-01-14 11:28:38 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-04-21 13:59:26 -0400 |
commit | 6d9b3fa5e7f663bbfb9d2d80d46136f75319cb28 (patch) | |
tree | eb21578a00e6e1092ba53c79a4a84e8dc8e13388 /kernel/trace/trace.c | |
parent | 4104d326b670c2b66f575d2004daa28b2d1b4c8d (diff) | |
download | blackbird-op-linux-6d9b3fa5e7f663bbfb9d2d80d46136f75319cb28.tar.gz blackbird-op-linux-6d9b3fa5e7f663bbfb9d2d80d46136f75319cb28.zip |
tracing: Move tracing_max_latency into trace_array
In preparation for letting the latency tracers be used by instances,
remove the global tracing_max_latency variable and add a max_latency
field to the trace_array that the latency tracers will now use.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index fdd33aacdf05..f5fc56bf0227 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -982,8 +982,6 @@ static arch_spinlock_t ftrace_max_lock = unsigned long __read_mostly tracing_thresh; #ifdef CONFIG_TRACER_MAX_TRACE -unsigned long __read_mostly tracing_max_latency; - /* * Copy the new maximum trace into the separate maximum-trace * structure. (this way the maximum trace is permanently saved, @@ -1000,7 +998,7 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) max_buf->cpu = cpu; max_buf->time_start = data->preempt_timestamp; - max_data->saved_latency = tracing_max_latency; + max_data->saved_latency = tr->max_latency; max_data->critical_start = data->critical_start; max_data->critical_end = data->critical_end; @@ -6328,6 +6326,11 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer) trace_create_file("tracing_on", 0644, d_tracer, tr, &rb_simple_fops); +#ifdef CONFIG_TRACER_MAX_TRACE + trace_create_file("tracing_max_latency", 0644, d_tracer, + &tr->max_latency, &tracing_max_lat_fops); +#endif + if (ftrace_create_function_files(tr, d_tracer)) WARN(1, "Could not allocate function filter files"); @@ -6353,11 +6356,6 @@ static __init int tracer_init_debugfs(void) init_tracer_debugfs(&global_trace, d_tracer); -#ifdef CONFIG_TRACER_MAX_TRACE - trace_create_file("tracing_max_latency", 0644, d_tracer, - &tracing_max_latency, &tracing_max_lat_fops); -#endif - trace_create_file("tracing_thresh", 0644, d_tracer, &tracing_thresh, &tracing_max_lat_fops); |