From: David Mosberger <davidm@napali.hpl.hp.com>
To: "Howell, David P" <david.p.howell@intel.com>
Cc: "Maciej Soltysiak" <solt@dns.toxicfilms.tv>,
<linux-kernel@vger.kernel.org>
Subject: RE: timing an application
Date: Tue, 14 Jan 2003 13:34:15 -0800 [thread overview]
Message-ID: <15908.33367.652106.144165@napali.hpl.hp.com> (raw)
In-Reply-To: <331AD7BED1579543AD146F5A1A44D525127AD6@fmsmsx403.fm.intel.com>
>>>>> On Tue, 14 Jan 2003 12:37:05 -0800, "Howell, David P" <david.p.howell@intel.com> said:
Dave> If this is on a IA32(Pentium II or later)/IA64 have you
Dave> considered using the processor TSC register to get interval
Dave> timestamps? It's a lot lighter weight and should give better
Dave> resolution. When we have done this we compared the tick values
Dave> directly.
Dave> To convert TSC ticks to time the /proc/cpuinfo value for 'cpu
Dave> MHz', see the glibc get_clockfreq.c and hp_timing.h
Dave> implementation for details.
Note that it's tricky to uses TSC/ITC on multiprocessors, especially
on large machines, on which the clocks for different CPUs may drift, etc.
It's much better to use the clock_gettime() routine:
http://www.opengroup.org/onlinepubs/007908799/xsh/clock_getres.html
Where properly implemented, this will be both as fast and accurate.
--david
next prev parent reply other threads:[~2003-01-14 21:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-14 20:37 Howell, David P
2003-01-14 21:34 ` David Mosberger [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-14 19:58 Maciej Soltysiak
2003-01-14 20:07 ` Chris Friesen
2003-01-14 20:38 ` Corey Minyard
2003-01-14 20:20 ` Richard B. Johnson
2003-01-14 22:09 ` Olaf Dietsche
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=15908.33367.652106.144165@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=david.p.howell@intel.com \
--cc=davidm@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=solt@dns.toxicfilms.tv \
/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
all inboxes | Powered by JetHome®