From: "John R. Hogerhuis" <jhoger@pobox.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Profiling Qemu for speed?
Date: Sun, 17 Apr 2005 19:11:32 -0700 [thread overview]
Message-ID: <1113790292.25892.587.camel@aragorn> (raw)
In-Reply-To: <20050418013615.89123.qmail@web51604.mail.yahoo.com>
On Sun, 2005-04-17 at 18:36 -0700, Nathaniel G H wrote:
> I was up until 3:00am studying Qemu, and I came to the conclusion that
> it doesn't make sense to try speeding up the output code, at least not
> yet. A peephole optimizer or hand-coded sequences made to handle common
> combinations of instructions would lead to the problems discussed here:
> exceptions happening at the right time, self-modifying code, etc.
Well yeah... I didn't say it would be easy :-)
> Worse, the translator might have to spend so much time doing this that
> the result would actually be slower execution.
Not if you do it right. Remember. by and large you only incur a one-time
hit, and after that you're going as fast as your dynamic translator is
smart.
Here's a heuristic for you: optimize for the general case, not corner
cases. You still have to handle the corner cases, but they are corner
cases for a reason: you don't run into them as often.
>
> I have another idea: The next-best thing to making faster output is to
> make the same output, faster. In other words, speeding up the
> translator. Given that the bulk of the translator is in disas_insn()
> and all the gen_* functions it calls, this seems like a good place to
> begin.
>
Why would that be faster? Most of the time you only dynamically
translate code once. Self modifying code, exceptions, are, well,
exceptions.
The lowest hanging fruit right now is probably the cirrus svga
emulation. That will probably make a huge, noticeable difference.
Then like I said I think there is always room to make the dynamic code
generator smarter.
-- John.
next prev parent reply other threads:[~2005-04-18 2:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-17 5:58 [Qemu-devel] Profiling Qemu for speed? Joe Luser
2005-04-17 8:21 ` John R. Hogerhuis
2005-04-17 8:59 ` Jonas Maebe
2005-04-17 10:27 ` Paul Brook
2005-04-17 10:46 ` Jonas Maebe
2005-04-18 1:36 ` Nathaniel G H
2005-04-18 2:11 ` John R. Hogerhuis [this message]
2005-04-18 2:39 ` André Braga
2005-04-18 4:31 ` Karl Magdsick
2005-04-17 10:36 ` Paul Brook
-- strict thread matches above, loose matches on Subject: below --
2005-04-18 8:35 Daniel J Guinan
2005-04-18 9:51 ` Ian Rogers
2005-04-18 13:44 ` Daniel Egger
2005-04-18 14:12 ` Christian MICHON
2005-04-18 14:29 ` Ian Rogers
2005-04-18 14:19 ` Ian Rogers
2005-04-18 14:40 ` Paul Brook
2005-04-18 11:24 Daniel J Guinan
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=1113790292.25892.587.camel@aragorn \
--to=jhoger@pobox.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).