From: "Lluís Vilanova" <vilanova@ac.upc.edu>
To: Laurent Desnogues <laurent.desnogues@gmail.com>
Cc: stefanha@gmail.com, qemu-devel@nongnu.org,
"陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>
Subject: Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
Date: Fri, 15 Jun 2012 22:10:03 +0300 [thread overview]
Message-ID: <87ehpgxugk.fsf@fimbulvetr.bsc.es> (raw)
In-Reply-To: <CABoDooO0OMyXc3fpQ3Eh_zfqSr_Vj0gm+hSb=dY3Uybs8Ete4A@mail.gmail.com> (Laurent Desnogues's message of "Fri, 15 Jun 2012 10:23:50 +0200")
Laurent Desnogues writes:
> On Fri, Jun 15, 2012 at 12:30 AM, Lluís Vilanova <vilanova@ac.upc.edu> wrote:
> [...]
>> Now that I think of it, you will have problems generating code to surround each
>> qemu_ld/st with a lightweight mechanism to get the time. In x86 it would be
>> rdtsc, but you want to generate a host rdtsc instruction inside the code
>> generated by QEMU's TCG, so you should also have to hack TCG (or the code
>> generation pointers) to issue an rdtsc instruction.
> Even rdtsc would introduce enough noise that it wouldn't be reliable
> for such a micro measurement: as far as I understand it, this instruction
> can be reordered, so you need to flush the pipeline before issuing it.
> Intel has a document about that:
> download.intel.com/embedded/software/IA/324264.pdf
> The overhead of their proposed method is so high that it's likely it
> would take longer than the execution of the fast path itself.
> IMHO a mix of YeongKyoon Lee way to count ld/st and comparison
> between user mode and softmmu still seems to be the best approach
> (well unless you have access to a cycle accurate simulator :-).
Ah, true; I forgot about the architectural implications. Sometimes you just
assume the nice in-order world :)
Lluis
--
"And it's much the same thing with knowledge, for whenever you learn
something new, the whole world becomes that much richer."
-- The Princess of Pure Reason, as told by Norton Juster in The Phantom
Tollbooth
next prev parent reply other threads:[~2012-06-15 19:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 3:14 [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time? 陳韋任 (Wei-Ren Chen)
2012-06-13 9:18 ` Stefan Hajnoczi
2012-06-13 12:43 ` Lluís Vilanova
2012-06-14 3:29 ` 陳韋任 (Wei-Ren Chen)
2012-06-14 23:17 ` Lluís Vilanova
2012-06-13 10:43 ` Laurent Desnogues
2012-06-14 3:18 ` 陳韋任 (Wei-Ren Chen)
2012-06-14 22:30 ` Lluís Vilanova
2012-06-15 8:23 ` Laurent Desnogues
2012-06-15 19:10 ` Lluís Vilanova [this message]
2012-06-18 8:28 ` 陳韋任 (Wei-Ren Chen)
2012-06-18 19:36 ` Blue Swirl
2012-06-18 20:26 ` Lluís Vilanova
2012-06-19 7:52 ` 陳韋任 (Wei-Ren Chen)
2012-06-19 9:35 ` Michael.Kang
2012-06-19 9:47 ` Michael.Kang
2012-06-19 10:51 ` Lluís Vilanova
2012-06-18 19:38 ` Lluís Vilanova
[not found] ` <20120619075534.GB34488@cs.nctu.edu.tw>
[not found] ` <4FE0347A.9040309@redhat.com>
[not found] ` <20120619084939.GA37515@cs.nctu.edu.tw>
2012-06-19 9:01 ` Orit Wasserman
2012-06-14 3:31 ` 陳韋任 (Wei-Ren Chen)
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 12:35 YeongKyoon Lee
2012-06-15 19:20 ` Blue Swirl
2012-06-18 6:57 ` 陳韋任 (Wei-Ren Chen)
2012-06-18 19:28 ` Blue Swirl
2012-06-15 2:10 YeongKyoon Lee
2012-06-18 4:59 YeongKyoon Lee
2012-06-18 19:21 ` Blue Swirl
2012-06-20 7:57 陳韋任 (Wei-Ren Chen)
2012-06-22 9:58 ` Xin Tong
2012-06-24 6:13 ` Blue Swirl
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=87ehpgxugk.fsf@fimbulvetr.bsc.es \
--to=vilanova@ac.upc.edu \
--cc=chenwj@iis.sinica.edu.tw \
--cc=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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.