qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Idea for speed improvement


From: Johannes Schindelin
Subject: [Qemu-devel] Idea for speed improvement
Date: Wed, 6 Oct 2004 16:19:14 +0200 (CEST)

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"?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]