[ltt-dev] [LTTng][RFC][Patch 1/2] add cpu_id parameter to sched_try_wakeup(_new) markers

Masami Hiramatsu mhiramat at redhat.com
Tue Aug 26 11:32:23 EDT 2008


Hi,

When I used lttng's markers, I found some tracepoint/markers can
provide more useful information for investigating some kernel issues.
So, I'd like to request to add those information.

Thank you,

Add cpu_id parameter to sched_try_wakeup(_new) markers.

This enables marker probe to trace on which cpu the target
process wake up.

Signed-off-by: Masami Hiramatsu <mhiramat at redhat.com>
Signed-off-by: Hideo Aoki <haoki at redhat.com>
---
 kernel/kernel-trace.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6-lttng/kernel/kernel-trace.c
===================================================================
--- linux-2.6-lttng.orig/kernel/kernel-trace.c	2008-08-21 14:40:55.000000000 -0400
+++ linux-2.6-lttng/kernel/kernel-trace.c	2008-08-21 14:44:45.000000000 -0400
@@ -85,14 +85,14 @@

 static void probe_sched_wakeup(struct rq *rq, struct task_struct *p)
 {
-	trace_mark(kernel_sched_try_wakeup, "pid %d state %ld",
-		p->pid, p->state);
+	trace_mark(kernel_sched_try_wakeup, "pid %d state %ld cpu_id %u",
+		p->pid, p->state, task_cpu(p));
 }

 static void probe_sched_wakeup_new(struct rq *rq, struct task_struct *p)
 {
-	trace_mark(kernel_sched_wakeup_new_task, "pid %d state %ld",
-		p->pid, p->state);
+	trace_mark(kernel_sched_wakeup_new_task, "pid %d state %ld cpu_id %u",
+		p->pid, p->state, task_cpu(p));
 }

 static void probe_sched_switch(struct rq *rq, struct task_struct *prev,



-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat at redhat.com





More information about the lttng-dev mailing list