From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [RFC kvm-unit-tests] api: Add dirty logging performance test
Date: Sun, 08 Jan 2012 16:54:27 +0200 [thread overview]
Message-ID: <4F09AE23.5070101@redhat.com> (raw)
In-Reply-To: <20120108234925.f3cd34c9ead6ad9c3e07b980@gmail.com>
On 01/08/2012 04:49 PM, Takuya Yoshikawa wrote:
> > > +
> > > + gettimeofday(&start_time, NULL);
> > > + slot.update_dirty_log();
> > > + gettimeofday(&end_time, NULL);
> >
> > Nicer to have a function that returns time in nanoseconds.
>
> I don't know such an API which can be used in userspace.
static uint64_t time_ns()
{
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec * (uint64_t)1000000000 + tv.tv_usec * 1000;
}
(that's not nanosecond precision, but it gives a single number instead
of a pair; there's also clock_gettime() that does have nanosecond
precision).
> If we can use nano-precision timer, I want to check other things
> too, e.g. emulation.
>
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-01-08 14:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-08 13:58 [RFC kvm-unit-tests] api: Add dirty logging performance test Takuya Yoshikawa
2012-01-08 14:21 ` Avi Kivity
2012-01-08 14:49 ` Takuya Yoshikawa
2012-01-08 14:54 ` Avi Kivity [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=4F09AE23.5070101@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=takuya.yoshikawa@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.