[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1338797382-287275-3-git-send-email-avagin@openvz.org>
Date: Mon, 4 Jun 2012 12:09:39 +0400
From: Andrew Vagin <avagin@...nvz.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Arun Sharma <asharma@...com>, Oleg Strikov <OSTRIKOV@...dia.com>,
Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/5] sched: send the event sched_switch before perf_event_task_sched_out
Otherwice they can't be filtered for a defined task.
perf record -e sched:sched_switch ./foo
This command doesn't report any event without this patch.
Signed-off-by: Andrew Vagin <avagin@...nvz.org>
---
kernel/sched/core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 39eb601..e17a3ec 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1911,12 +1911,12 @@ static inline void
prepare_task_switch(struct rq *rq, struct task_struct *prev,
struct task_struct *next)
{
+ trace_sched_switch(prev, next);
sched_info_switch(prev, next);
perf_event_task_sched_out(prev, next);
fire_sched_out_preempt_notifiers(prev, next);
prepare_lock_switch(rq, next);
prepare_arch_switch(next);
- trace_sched_switch(prev, next);
}
/**
@@ -1976,6 +1976,7 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)
kprobe_flush_task(prev);
put_task_struct(prev);
}
+ trace_sched_switch_finish(current);
}
#ifdef CONFIG_SMP
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists