[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb |
Date: |
Fri, 18 Sep 2015 09:18:17 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 09/18/2015 06:08 AM, Peter Maydell wrote:
> You're still not allowing for your worst-case datatable size when we
> calculate tcg_ctx.code_gen_buffer_max_size.
Hum. What factor do you suggest?
The maximum table expansion is of course going to depend on the target, since
the "extra words" could conceivably encode badly. See mips, sh4 "flags".
For a "normal" target with no, or "small" extra words (cc_op is never large,
nor is the arm condexec), the max expansion per-opcode would appear to be a
long sequence of nops, where the opcodes emitted would consist solely of
insn_start. The table would consume (2+extra) bytes per nop. Since state is
not changing, all but the PC column would be zeros.
Would you be happy if I simply arbitrarily bumped the other magic number here,
TCG_MAX_OP_SIZE? Adjust it from 192 to 200, or something?
I didn't try to add a guard page yet, since our logic in allocating the code
gen buffer are a bit confused. I'm a bit surprised that we don't prefer mmap
all of the time.
r~
- [Qemu-devel] [PATCH v2 12/22] target-sparc: Tidy gen_branch_a interface, (continued)
- [Qemu-devel] [PATCH v2 12/22] target-sparc: Tidy gen_branch_a interface, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 15/22] target-sparc: Add npc state to insn_start, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 14/22] target-sparc: Remove gen_opc_jump_pc, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 16/22] tcg: Merge cpu_gen_code into tb_gen_code, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 13/22] target-sparc: Split out gen_branch_n, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 17/22] target-*: Drop cpu_gen_code define, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 18/22] tcg: Add TCG_MAX_INSNS, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 19/22] tcg: Pass data argument to restore_state_to_opc, Richard Henderson, 2015/09/18
- [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb, Richard Henderson, 2015/09/18
- Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb, Richard Henderson, 2015/09/19
- Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb, Peter Maydell, 2015/09/19
[Qemu-devel] [PATCH v2 22/22] tcg: Remove tcg_gen_code_search_pc, Richard Henderson, 2015/09/18
[Qemu-devel] [PATCH v2 21/22] tcg: Remove gen_intermediate_code_pc, Richard Henderson, 2015/09/18
Re: [Qemu-devel] [PATCH v2 00/22] Do away with TB retranslation, Leon Alrae, 2015/09/18