qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Idea for speed improvement
@ 2004-10-06 14:19 Johannes Schindelin
  2004-10-06 15:56 ` Andreas Bollhalder
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2004-10-06 14:19 UTC (permalink / raw)
  To: qemu-devel

Hi,

how about the following scenario: We add a "-profile <filename>" option to
QEmu, which just writes out profiling data:

- all the (optimized) intermediate stages of all the translated blocks are
  written into that file.
- the first op will be op_incr_tb_usage_counter, which increments a
  counter in the TB structure.
- whenever a TB is flushed, the counter is written into that file also.

After one run with "-profile", a tool can analyze that data, and generate
a header file which inlines the most frequent sequences to produce new
op_* functions, and code for the optimization phase of the dynamic
translation, which collapses those sequences to the newly created ops.

Then, QEmu is compiled anew, using that code.

This all depends on gcc doing a good job at optimizing the hell out of
those sequences, of course.

Just op_exit_tb cannot be inlined like that, because of the stack problem
I mentioned earlier on this list.

Thoughts, comments, bashing?

Ciao,
Dscho

P.S.: Fabrice, is this what you meant by "gcc backend"?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-07 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06 14:19 [Qemu-devel] Idea for speed improvement Johannes Schindelin
2004-10-06 15:56 ` Andreas Bollhalder
2004-10-06 16:18   ` Johannes Schindelin
2004-10-07 16:23     ` Andreas Bollhalder

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).