Re: [Qemu-devel] [PATCH v3 25/25] tcg: Check for overflow via highwater mark

2015-09-23 Thread Richard Henderson
On 09/23/2015 12:42 PM, Peter Maydell wrote: >> +/* Threshold to flush the translated code buffer, and where to go >> + upon overflow. */ >> +void *code_gen_highwater; > > I don't understand what the "and where to go upon overflow" part > of this comment means. Can you elaborate? H

Re: [Qemu-devel] [PATCH v3 25/25] tcg: Check for overflow via highwater mark

2015-09-23 Thread Peter Maydell
On 22 September 2015 at 13:25, Richard Henderson wrote: > 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 op

[Qemu-devel] [PATCH v3 25/25] tcg: Check for overflow via highwater mark

2015-09-22 Thread Richard Henderson
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 mi