On Fri, Jul 14, 2017 at 23:42:17 -1000, Richard Henderson wrote:
> From: Lluís Vilanova <vilan...@ac.upc.edu>
> 
> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu>
> Message-Id: <150002073981.22386.9870422422367410100.st...@frigg.lan>
> [rth: Moved max_insns adjustment from tb_start to init_disas_context.
> Removed pc_next return from translate_insn.
> Removed tcg_check_temp_count from generic loop.
> Moved gen_io_end to exactly match gen_io_start.
> Use qemu_log instead of error_report for temporary leaks.
> Moved TB size/icount assignments before disas_log.]
> Signed-off-by: Richard Henderson <r...@twiddle.net>
(snip)
> +void translator_loop_temp_check(DisasContextBase *db)
> +{
> +    if (tcg_check_temp_count()) {
> +        qemu_log("warning: TCG temporary leaks before "
> +                 TARGET_FMT_lx "\n", db->pc_next);
> +    }
> +}

I dislike that we have target code calling tcg_clear_temp_count()
and then calling translator_loop_temp_check().

I suggest we either:
- Add an inline wrapping tcg_clear_temp_count(), calling it something
  like translator_loop_clear_temp_count()
- Just add a comment to this function, e.g.
  '/* pairs with tcg_clear_temp_count() */'

Ignoring that and the update needed to the docs that Lluis mentioned,

Reviewed-by: Emilio G. Cota <c...@braap.org>

                E.

Reply via email to