diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-05-12 15:20:44 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:40:15 -0400 |
commit | 89b2f97819dd074297bbe3e19eaa4afcc98845ad (patch) | |
tree | 250196b493d42ac312b089f8f75866518cc772e6 /kernel/trace/trace.c | |
parent | 18cef379d30f5ded20cc31d7f2d342639d39919d (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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 9175ce91b8f6..95966561ba3d 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) | |||
153 | memcpy(max_tr.data[i], data, sizeof(*data)); | 153 | memcpy(max_tr.data[i], data, sizeof(*data)); |
154 | data->trace = save_trace; | 154 | data->trace = save_trace; |
155 | data->trace_pages = save_pages; | 155 | data->trace_pages = save_pages; |
156 | tracing_reset(data); | ||
156 | } | 157 | } |
157 | 158 | ||
158 | __update_max_tr(tr, tsk, cpu); | 159 | __update_max_tr(tr, tsk, cpu); |
@@ -183,6 +184,7 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu) | |||
183 | memcpy(max_tr.data[cpu], data, sizeof(*data)); | 184 | memcpy(max_tr.data[cpu], data, sizeof(*data)); |
184 | data->trace = save_trace; | 185 | data->trace = save_trace; |
185 | data->trace_pages = save_pages; | 186 | data->trace_pages = save_pages; |
187 | tracing_reset(data); | ||
186 | 188 | ||
187 | __update_max_tr(tr, tsk, cpu); | 189 | __update_max_tr(tr, tsk, cpu); |
188 | spin_unlock(&ftrace_max_lock); | 190 | spin_unlock(&ftrace_max_lock); |
@@ -877,6 +879,8 @@ print_lat_fmt(struct seq_file *m, struct trace_iterator *iter, | |||
877 | entry->ctx.next_prio, | 879 | entry->ctx.next_prio, |
878 | comm); | 880 | comm); |
879 | break; | 881 | break; |
882 | default: | ||
883 | seq_printf(m, "Unknown type %d\n", entry->type); | ||
880 | } | 884 | } |
881 | } | 885 | } |
882 | 886 | ||
@@ -1625,7 +1629,6 @@ __init static int tracer_alloc_buffers(void) | |||
1625 | * round up a bit. | 1629 | * round up a bit. |
1626 | */ | 1630 | */ |
1627 | global_trace.entries = ENTRIES_PER_PAGE; | 1631 | global_trace.entries = ENTRIES_PER_PAGE; |
1628 | max_tr.entries = global_trace.entries; | ||
1629 | pages++; | 1632 | pages++; |
1630 | 1633 | ||
1631 | while (global_trace.entries < trace_nr_entries) { | 1634 | while (global_trace.entries < trace_nr_entries) { |
@@ -1633,6 +1636,7 @@ __init static int tracer_alloc_buffers(void) | |||
1633 | break; | 1636 | break; |
1634 | pages++; | 1637 | pages++; |
1635 | } | 1638 | } |
1639 | max_tr.entries = global_trace.entries; | ||
1636 | 1640 | ||
1637 | pr_info("tracer: %d pages allocated for %ld", | 1641 | pr_info("tracer: %d pages allocated for %ld", |
1638 | pages, trace_nr_entries); | 1642 | pages, trace_nr_entries); |