[Qemu-devel] [PATCH 18/22] tcg: define TCG_HIGHWATER

Emilio G. Cota posted 22 patches 8 years, 3 months ago
[Qemu-devel] [PATCH 18/22] tcg: define TCG_HIGHWATER
Posted by Emilio G. Cota 8 years, 3 months ago
Will come in handy very soon.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 tcg/tcg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index c19c473..2f003a0 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -115,6 +115,8 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type,
 static void tcg_out_tb_init(TCGContext *s);
 static bool tcg_out_tb_finalize(TCGContext *s);
 
+#define TCG_HIGHWATER 1024
+
 static QemuMutex tcg_lock;
 
 /*
@@ -453,7 +455,7 @@ void tcg_prologue_init(TCGContext *s)
     /* Compute a high-water mark, at which we voluntarily flush the buffer
        and start over.  The size here is arbitrary, significantly larger
        than we expect the code generation for any one opcode to require.  */
-    s->code_gen_highwater = s->code_gen_buffer + (total_size - 1024);
+    s->code_gen_highwater = s->code_gen_buffer + (total_size - TCG_HIGHWATER);
 
     tcg_register_jit(s->code_gen_buffer, total_size);
 
-- 
2.7.4


Re: [Qemu-devel] [PATCH 18/22] tcg: define TCG_HIGHWATER
Posted by Richard Henderson 8 years, 3 months ago
On 07/08/2017 09:50 PM, Emilio G. Cota wrote:
> Will come in handy very soon.
> 
> Signed-off-by: Emilio G. Cota<cota@braap.org>
> ---
>   tcg/tcg.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

Re: [Qemu-devel] [PATCH 18/22] tcg: define TCG_HIGHWATER
Posted by Alex Bennée 8 years, 3 months ago
Emilio G. Cota <cota@braap.org> writes:

> Will come in handy very soon.
>
> Signed-off-by: Emilio G. Cota <cota@braap.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  tcg/tcg.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index c19c473..2f003a0 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -115,6 +115,8 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type,
>  static void tcg_out_tb_init(TCGContext *s);
>  static bool tcg_out_tb_finalize(TCGContext *s);
>
> +#define TCG_HIGHWATER 1024
> +
>  static QemuMutex tcg_lock;
>
>  /*
> @@ -453,7 +455,7 @@ void tcg_prologue_init(TCGContext *s)
>      /* Compute a high-water mark, at which we voluntarily flush the buffer
>         and start over.  The size here is arbitrary, significantly larger
>         than we expect the code generation for any one opcode to require.  */
> -    s->code_gen_highwater = s->code_gen_buffer + (total_size - 1024);
> +    s->code_gen_highwater = s->code_gen_buffer + (total_size - TCG_HIGHWATER);
>
>      tcg_register_jit(s->code_gen_buffer, total_size);


--
Alex Bennée