From: peterz@infradead.org (Peter Zijlstra)
Subject: [ltt-dev] [patch] add tracepoints to trace activate/deactivate task
Date: Wed, 10 Dec 2008 14:14:32 +0100 [thread overview]
Message-ID: <1228914872.12143.11.camel@twins> (raw)
In-Reply-To: <20081210123440.GD28524@Krystal>
On Wed, 2008-12-10 at 07:34 -0500, Mathieu Desnoyers wrote:
> > include/trace/sched.h | 4 ++--
> > kernel/sched.c | 3 ++-
> > 2 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/trace/sched.h b/include/trace/sched.h
> > index 9b2854a..f4549d5 100644
> > --- a/include/trace/sched.h
> > +++ b/include/trace/sched.h
> > @@ -30,8 +30,8 @@ DECLARE_TRACE(sched_switch,
> > TPARGS(rq, prev, next));
> >
> > DECLARE_TRACE(sched_migrate_task,
> > - TPPROTO(struct rq *rq, struct task_struct *p, int dest_cpu),
> > - TPARGS(rq, p, dest_cpu));
> > + TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
> > + TPARGS(p, orig_cpu, dest_cpu));
> >
> > DECLARE_TRACE(sched_process_free,
> > TPPROTO(struct task_struct *p),
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 0eff15b..3dc54cd 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -1861,6 +1861,8 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
> >
> > clock_offset = old_rq->clock - new_rq->clock;
> >
> > + trace_sched_migrate_task(p, task_cpu(p), new_cpu);
>
> Hrm, looking at it, I think that :
>
> - task_cpu(p) will add some code output outside of the conditional
> branch, which I think we would like to avoid.
> - We can easily get the "from" cpu within the tracepoint probe.
> Therefore, I don't see why we would extract this information
> explicitly ?
Right, just nuke it - thanks!
prev parent reply other threads:[~2008-12-10 13:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 19:49 Jason Baron
2008-12-08 19:54 ` Peter Zijlstra
2008-12-08 22:38 ` Jason Baron
2008-12-08 22:42 ` Peter Zijlstra
2008-12-09 21:00 ` Jason Baron
2008-12-09 21:29 ` Jason Baron
2008-12-09 22:10 ` Mathieu Desnoyers
2008-12-10 7:08 ` Peter Zijlstra
2008-12-10 12:27 ` Mathieu Desnoyers
2008-12-10 13:15 ` Peter Zijlstra
2008-12-10 17:14 ` Jason Baron
2008-12-10 17:52 ` Mathieu Desnoyers
2008-12-10 19:28 ` Peter Zijlstra
2008-12-10 12:34 ` Mathieu Desnoyers
2008-12-10 13:14 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1228914872.12143.11.camel@twins \
--to=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox