mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
tcg: Check for overflow via highwater mark
We currently pre-compute an worst case code size for any TB, which works out to be 122kB. Since the average TB size is near 1kB, this wastes quite a lot of storage. Instead, check for overflow in between generating code for each opcode. The overhead of the check isn't measurable and wastage is minimized. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
f293709c6a
commit
b125f9dc7b
4 changed files with 40 additions and 16 deletions
|
@ -559,10 +559,11 @@ struct TCGContext {
|
|||
void *code_gen_prologue;
|
||||
void *code_gen_buffer;
|
||||
size_t code_gen_buffer_size;
|
||||
/* threshold to flush the translated code buffer */
|
||||
size_t code_gen_buffer_max_size;
|
||||
void *code_gen_ptr;
|
||||
|
||||
/* Threshold to flush the translated code buffer. */
|
||||
void *code_gen_highwater;
|
||||
|
||||
TBContext tb_ctx;
|
||||
|
||||
/* The TCGBackendData structure is private to tcg-target.c. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue