aboutsummaryrefslogtreecommitdiff
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-05-12 21:20:44 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 20:40:15 +0200
commit89b2f97819dd074297bbe3e19eaa4afcc98845ad (patch)
tree250196b493d42ac312b089f8f75866518cc772e6 /kernel/trace/trace.c
parent18cef379d30f5ded20cc31d7f2d342639d39919d (diff)
ftrace: fix updates to max trace
This patch fixes some bugs to the updating of the max trace that was caused by implementing the new buffering. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9175ce91b8f..95966561ba3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -153,6 +153,7 @@ update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
memcpy(max_tr.data[i], data, sizeof(*data));
data->trace = save_trace;
data->trace_pages = save_pages;
+ tracing_reset(data);
}
__update_max_tr(tr, tsk, cpu);
@@ -183,6 +184,7 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu)
memcpy(max_tr.data[cpu], data, sizeof(*data));
data->trace = save_trace;
data->trace_pages = save_pages;
+ tracing_reset(data);
__update_max_tr(tr, tsk, cpu);
spin_unlock(&ftrace_max_lock);
@@ -877,6 +879,8 @@ print_lat_fmt(struct seq_file *m, struct trace_iterator *iter,
entry->ctx.next_prio,
comm);
break;
+ default:
+ seq_printf(m, "Unknown type %d\n", entry->type);
}
}
@@ -1625,7 +1629,6 @@ __init static int tracer_alloc_buffers(void)
* round up a bit.
*/
global_trace.entries = ENTRIES_PER_PAGE;
- max_tr.entries = global_trace.entries;
pages++;
while (global_trace.entries < trace_nr_entries) {
@@ -1633,6 +1636,7 @@ __init static int tracer_alloc_buffers(void)
break;
pages++;
}
+ max_tr.entries = global_trace.entries;
pr_info("tracer: %d pages allocated for %ld",
pages, trace_nr_entries);