Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-19 Thread Richard Henderson
On 09/18/2015 06:08 AM, Peter Maydell wrote: On 18 September 2015 at 05:55, Richard Henderson wrote: We can now restore state without retranslation. Signed-off-by: Richard Henderson --- +/* Encode the data collected about the instructions while compiling

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-19 Thread Peter Maydell
On 19 September 2015 at 22:02, Richard Henderson wrote: > I'll note that the current worst-case estimate is way too big: 122kB. Well, it's way too big because we have a bad worst-case: a TB with lots of insns that generate a lot of TCG ops. That pretty much never happens but

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-18 Thread Richard Henderson
On 09/18/2015 03:44 PM, Peter Maydell wrote: Well, if we're going to add a margin we need to add the worst-case margin. I guess the worst case is that deltas of the insn_data words between each insn are useless, and we need full 64-bit values to represent them -- 9 bytes for the sleb128.

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 17:18, Richard Henderson wrote: > 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

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 05:55, Richard Henderson wrote: > We can now restore state without retranslation. > > Signed-off-by: Richard Henderson > --- > +/* Encode the data collected about the instructions while compiling TB. > + Place the data at BLOCK, and

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-18 Thread Richard Henderson
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"

[Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-17 Thread Richard Henderson
We can now restore state without retranslation. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 1 + tcg/tcg.c | 42 - tcg/tcg.h | 5 +- translate-all.c | 153 +++-