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) |
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 = | |||
982 | unsigned long __read_mostly tracing_thresh; | 982 | unsigned long __read_mostly tracing_thresh; |
983 | 983 | ||
984 | #ifdef CONFIG_TRACER_MAX_TRACE | 984 | #ifdef CONFIG_TRACER_MAX_TRACE |
985 | unsigned long __read_mostly tracing_max_latency; | ||
986 | |||
987 | /* | 985 | /* |
988 | * Copy the new maximum trace into the separate maximum-trace | 986 | * Copy the new maximum trace into the separate maximum-trace |
989 | * structure. (this way the maximum trace is permanently saved, | 987 | * 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) | |||
1000 | max_buf->cpu = cpu; | 998 | max_buf->cpu = cpu; |
1001 | max_buf->time_start = data->preempt_timestamp; | 999 | max_buf->time_start = data->preempt_timestamp; |
1002 | 1000 | ||
1003 | max_data->saved_latency = tracing_max_latency; | 1001 | max_data->saved_latency = tr->max_latency; |
1004 | max_data->critical_start = data->critical_start; | 1002 | max_data->critical_start = data->critical_start; |
1005 | max_data->critical_end = data->critical_end; | 1003 | max_data->critical_end = data->critical_end; |
1006 | 1004 | ||
@@ -6328,6 +6326,11 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer) | |||
6328 | trace_create_file("tracing_on", 0644, d_tracer, | 6326 | trace_create_file("tracing_on", 0644, d_tracer, |
6329 | tr, &rb_simple_fops); | 6327 | tr, &rb_simple_fops); |
6330 | 6328 | ||
6329 | #ifdef CONFIG_TRACER_MAX_TRACE | ||
6330 | trace_create_file("tracing_max_latency", 0644, d_tracer, | ||
6331 | &tr->max_latency, &tracing_max_lat_fops); | ||
6332 | #endif | ||
6333 | |||
6331 | if (ftrace_create_function_files(tr, d_tracer)) | 6334 | if (ftrace_create_function_files(tr, d_tracer)) |
6332 | WARN(1, "Could not allocate function filter files"); | 6335 | WARN(1, "Could not allocate function filter files"); |
6333 | 6336 | ||
@@ -6353,11 +6356,6 @@ static __init int tracer_init_debugfs(void) | |||
6353 | 6356 | ||
6354 | init_tracer_debugfs(&global_trace, d_tracer); | 6357 | init_tracer_debugfs(&global_trace, d_tracer); |
6355 | 6358 | ||
6356 | #ifdef CONFIG_TRACER_MAX_TRACE | ||
6357 | trace_create_file("tracing_max_latency", 0644, d_tracer, | ||
6358 | &tracing_max_latency, &tracing_max_lat_fops); | ||
6359 | #endif | ||
6360 | |||
6361 | trace_create_file("tracing_thresh", 0644, d_tracer, | 6359 | trace_create_file("tracing_thresh", 0644, d_tracer, |
6362 | &tracing_thresh, &tracing_max_lat_fops); | 6360 | &tracing_thresh, &tracing_max_lat_fops); |
6363 | 6361 | ||