diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-09-02 12:27:41 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-09-04 11:48:12 -0400 |
commit | 8248ac052dfd1eb41819fbc0ca5c7a1667e7e70c (patch) | |
tree | d979964a23112b6266d26da19a572057e5060367 /kernel | |
parent | 077c5407cd3231cf13472623995f0dfdda510d62 (diff) |
tracing: print out start and stop in latency traces
During development of the tracer, we would copy information from
the live tracer to the max tracer with one memcpy. Since then we
added a generic ring buffer and we handle the copies differently now.
Unfortunately, we never copied the critical section information, and
we lost the output:
# => started at: kmem_cache_alloc
# => ended at: kmem_cache_alloc
This patch adds back the critical start and end copying as well as
removes the unused "trace_idx" and "overrun" fields of the
trace_array_cpu structure.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.c | 19 | ||||
-rw-r--r-- | kernel/trace/trace.h | 3 |
2 files changed, 11 insertions, 11 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 0f0881676dc9..df2c9f730ac6 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -407,19 +407,22 @@ static void | |||
407 | __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) | 407 | __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) |
408 | { | 408 | { |
409 | struct trace_array_cpu *data = tr->data[cpu]; | 409 | struct trace_array_cpu *data = tr->data[cpu]; |
410 | struct trace_array_cpu *max_data = tr->data[cpu]; | ||
410 | 411 | ||
411 | max_tr.cpu = cpu; | 412 | max_tr.cpu = cpu; |
412 | max_tr.time_start = data->preempt_timestamp; | 413 | max_tr.time_start = data->preempt_timestamp; |
413 | 414 | ||
414 | data = max_tr.data[cpu]; | 415 | max_data = max_tr.data[cpu]; |
415 | data->saved_latency = tracing_max_latency; | 416 | max_data->saved_latency = tracing_max_latency; |
417 | max_data->critical_start = data->critical_start; | ||
418 | max_data->critical_end = data->critical_end; | ||
416 | 419 | ||
417 | memcpy(data->comm, tsk->comm, TASK_COMM_LEN); | 420 | memcpy(data->comm, tsk->comm, TASK_COMM_LEN); |
418 | data->pid = tsk->pid; | 421 | max_data->pid = tsk->pid; |
419 | data->uid = task_uid(tsk); | 422 | max_data->uid = task_uid(tsk); |
420 | data->nice = tsk->static_prio - 20 - MAX_RT_PRIO; | 423 | max_data->nice = tsk->static_prio - 20 - MAX_RT_PRIO; |
421 | data->policy = tsk->policy; | 424 | max_data->policy = tsk->policy; |
422 | data->rt_priority = tsk->rt_priority; | 425 | max_data->rt_priority = tsk->rt_priority; |
423 | 426 | ||
424 | /* record this tasks comm */ | 427 | /* record this tasks comm */ |
425 | tracing_record_cmdline(tsk); | 428 | tracing_record_cmdline(tsk); |
@@ -1501,7 +1504,7 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter) | |||
1501 | seq_puts(m, "\n# => ended at: "); | 1504 | seq_puts(m, "\n# => ended at: "); |
1502 | seq_print_ip_sym(&iter->seq, data->critical_end, sym_flags); | 1505 | seq_print_ip_sym(&iter->seq, data->critical_end, sym_flags); |
1503 | trace_print_seq(m, &iter->seq); | 1506 | trace_print_seq(m, &iter->seq); |
1504 | seq_puts(m, "#\n"); | 1507 | seq_puts(m, "\n#\n"); |
1505 | } | 1508 | } |
1506 | 1509 | ||
1507 | seq_puts(m, "#\n"); | 1510 | seq_puts(m, "#\n"); |
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index e2c06b21dd82..f2af713a8bcc 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -234,9 +234,6 @@ struct trace_array_cpu { | |||
234 | atomic_t disabled; | 234 | atomic_t disabled; |
235 | void *buffer_page; /* ring buffer spare */ | 235 | void *buffer_page; /* ring buffer spare */ |
236 | 236 | ||
237 | /* these fields get copied into max-trace: */ | ||
238 | unsigned long trace_idx; | ||
239 | unsigned long overrun; | ||
240 | unsigned long saved_latency; | 237 | unsigned long saved_latency; |
241 | unsigned long critical_start; | 238 | unsigned long critical_start; |
242 | unsigned long critical_end; | 239 | unsigned long critical_end; |