[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/22] translate-all: remove redundant !tcg_enab
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH 02/22] translate-all: remove redundant !tcg_enabled check in dump_exec_info |
Date: |
Mon, 10 Jul 2017 08:15:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 09.07.2017 09:49, Emilio G. Cota wrote:
> This check is redundant because it is already performed by the only
> caller of dump_exec_info -- the caller was updated by b7da97eef
> ("monitor: Check whether TCG is enabled before running the "info jit"
> code").
>
> Checking twice wouldn't necessarily be too bad, but here the check also
> returns with tb_lock held. So we can either do the check before tb_lock is
> acquired, or just get rid of it. Given that it is redundant, I am going
> for the latter option.
>
> Signed-off-by: Emilio G. Cota <address@hidden>
> ---
> accel/tcg/translate-all.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> index dfb9f0d..f768681 100644
> --- a/accel/tcg/translate-all.c
> +++ b/accel/tcg/translate-all.c
> @@ -1851,11 +1851,6 @@ void dump_exec_info(FILE *f, fprintf_function
> cpu_fprintf)
>
> tb_lock();
>
> - if (!tcg_enabled()) {
> - cpu_fprintf(f, "TCG not enabled\n");
> - return;
> - }
> -
> target_code_size = 0;
> max_target_code_size = 0;
> cross_page = 0;
>
Reviewed-by: Thomas Huth <address@hidden>
- Re: [Qemu-devel] [PATCH 07/22] tcg/i386: constify tcg_target_callee_save_regs, (continued)
- [Qemu-devel] [PATCH 06/22] translate-all: make have_tb_lock static, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 08/22] tcg/mips: constify tcg_target_callee_save_regs, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 02/22] translate-all: remove redundant !tcg_enabled check in dump_exec_info, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 04/22] tcg: fix corruption of code_time profiling counter upon tb_flush, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 14/22] tcg: take .helpers out of TCGContext, Emilio G. Cota, 2017/07/09
- [Qemu-devel] [PATCH 09/22] exec-all: shrink tb->invalid to uint8_t, Emilio G. Cota, 2017/07/09