On 06/29/2017 01:28 PM, Emilio G. Cota wrote:
Note that due to the cacheline padding we are using, for
hosts with 64-byte cache lines this will not waste any
additional memory. Using a s16 would be ideal, since that
would plug an existing hole in the struct, but I see no
guarantee that a TB won't overflow it.
Signed-off-by: Emilio G. Cota<[email protected]>
---
include/exec/exec-all.h | 1 +
accel/tcg/translate-all.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 35a75f1..df12338 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -363,6 +363,7 @@ struct TranslationBlock {
*/
uintptr_t jmp_list_next[2];
uintptr_t jmp_list_first;
+ int32_t out_size; /* size of host code for this block */
unsigned probably better.
I do wonder about putting it in the hole after invalid.
Which itself could be shrunk to bool.
I don't believe there's much chance of an overflow of uint16_t. The limit of
OPC_BUF_SIZE = 640 fairly well limits the practical size. And, honestly, it
doesn't matter if we saturate to 0xffff, so long as you retain the full-size
gen_code_size local variable.
r~