aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-03-05 16:23:50 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-03-05 21:12:08 -0500
commit1acaa1b2d9b5904c9cce06122990a2d71046ce16 (patch)
tree76e4d061aa4c666c89f581e438b105bd69ee27df /kernel/trace/trace.c
parenta094fe04c751698a18c3a0d376a3bdb117f1e0d8 (diff)
tracing: Update the comm field in the right variable in update_max_tr
The latency output showed: # | task: -3 (uid:0 nice:0 policy:1 rt_prio:99) The comm is missing in the "task:" and it looks like a minus 3 is the output. The correct display should be: # | task: migration/0-3 (uid:0 nice:0 policy:1 rt_prio:99) The problem is that the comm is being stored in the wrong data structure. The max_tr.data[cpu] is what stores the comm, not the tr->data[cpu]. Before this patch the max_tr.data[cpu]->comm was zeroed and the /debug/trace ended up showing just the '-' sign followed by the pid. Also remove a needless initialization of max_data. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <1267824230-23861-1-git-send-email-acme@infradead.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 032c57ca6502..6efd5cb3c252 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -592,7 +592,7 @@ static void
592__update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) 592__update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
593{ 593{
594 struct trace_array_cpu *data = tr->data[cpu]; 594 struct trace_array_cpu *data = tr->data[cpu];
595 struct trace_array_cpu *max_data = tr->data[cpu]; 595 struct trace_array_cpu *max_data;
596 596
597 max_tr.cpu = cpu; 597 max_tr.cpu = cpu;
598 max_tr.time_start = data->preempt_timestamp; 598 max_tr.time_start = data->preempt_timestamp;
@@ -602,7 +602,7 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
602 max_data->critical_start = data->critical_start; 602 max_data->critical_start = data->critical_start;
603 max_data->critical_end = data->critical_end; 603 max_data->critical_end = data->critical_end;
604 604
605 memcpy(data->comm, tsk->comm, TASK_COMM_LEN); 605 memcpy(max_data->comm, tsk->comm, TASK_COMM_LEN);
606 max_data->pid = tsk->pid; 606 max_data->pid = tsk->pid;
607 max_data->uid = task_uid(tsk); 607 max_data->uid = task_uid(tsk);
608 max_data->nice = tsk->static_prio - 20 - MAX_RT_PRIO; 608 max_data->nice = tsk->static_prio - 20 - MAX_RT_PRIO;