From: Peter Zijlstra <peterz@infradead.org>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Zhaolei <zhaolei@cn.fujitsu.com>,
kosaki.motohiro@jp.fujitsu.com,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Anton Blanchard <anton@samba.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/4] ftrace: add tracepoint for hrtimer
Date: Fri, 24 Jul 2009 13:11:11 +0200 [thread overview]
Message-ID: <1248433871.6987.24.camel@twins> (raw)
In-Reply-To: <4A698195.3020504@cn.fujitsu.com>
On Fri, 2009-07-24 at 17:40 +0800, Xiao Guangrong wrote:
>
> Peter Zijlstra wrote:
> > On Thu, 2009-07-23 at 18:01 +0800, Xiao Guangrong wrote:
> >> Peter Zijlstra wrote:
> >>
> >>> OK, so what you want to measure is the time of the actual callback
> >>> happening (hrtimer_entry) vs that where you would have expected it to
> >>> happen (hrtimer_start + delay), right?
> >>>
> >> Yes
> >>
> >>> So what's wrong with printing the expected expiration time in the
> >>> hrtimer_start tracepoint in the cheap clock units?
> >>>
> >> Is "cheap clock units" means jiffies time?
> >
> > Nah, something like cpu_clock() which is monotonic per-cpu and should
> > have high resolution where available.
> >
>
> Hi Peter,
>
> Thanks for your valuable suggestion.
>
> I have do some test for it, and it very suitable for CLOCK_MONOTONIC clock,
> but if the hrtimer's clock is CLOCK_REALTIME, however xtime is needed to get
> the real time.
If you also log xtime shifts in cpu_clock() units you're good again :-)
You could of course also choose to ignore xtime shifts (they're rarely
significant on the scale of timer intervals).
next prev parent reply other threads:[~2009-07-24 11:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 10:11 [PATCH v3 0/4] ftrace: add tracepoint for timer event Xiao Guangrong
2009-07-17 10:14 ` [PATCH v3 1/4] tracing/events: Add timer and high res timer tracepoints Xiao Guangrong
2009-07-17 10:16 ` [PATCH v3 2/4] ftrace: add tracepoint for timer Xiao Guangrong
2009-07-17 10:18 ` [PATCH v3 3/4] ftrace: add tracepoint for hrtimer Xiao Guangrong
2009-07-17 10:50 ` Peter Zijlstra
2009-07-20 7:25 ` Xiao Guangrong
2009-07-20 12:09 ` Peter Zijlstra
2009-07-22 9:36 ` Xiao Guangrong
2009-07-22 10:13 ` Peter Zijlstra
2009-07-22 15:36 ` Mathieu Desnoyers
2009-07-23 10:01 ` Xiao Guangrong
2009-07-23 10:07 ` Peter Zijlstra
2009-07-24 9:40 ` Xiao Guangrong
2009-07-24 11:11 ` Peter Zijlstra [this message]
2009-07-17 10:20 ` [PATCH v3 4/4] ftrace: add tracepoint for itimer Xiao Guangrong
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=1248433871.6987.24.camel@twins \
--to=peterz@infradead.org \
--cc=anton@samba.org \
--cc=fweisbec@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=xiaoguangrong@cn.fujitsu.com \
--cc=zhaolei@cn.fujitsu.com \
/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