[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] util/log: flush TB cache when log level changes
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] util/log: flush TB cache when log level changes |
Date: |
Fri, 22 Jan 2021 11:32:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
Hi Pavel,
On 1/22/21 11:03 AM, Pavel Dovgalyuk wrote:
> Sometimes we need to collect the translation logs starting
> from some point of the execution. Some TB listings may
> be missed in this case, when blocks were translated before.
> This patch clears TB cache to allow re-translation of such
> code blocks.
>
> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
> ---
> accel/tcg/translate-all.c | 8 ++++++++
> include/sysemu/tcg.h | 1 +
> stubs/meson.build | 1 +
> stubs/tcg.c | 12 ++++++++++++
> util/log.c | 3 +++
> 5 files changed, 25 insertions(+)
> create mode 100644 stubs/tcg.c
...
> /*
> * Formerly ifdef DEBUG_TB_CHECK. These debug functions are user-mode-only,
> * so in order to prevent bit rot we compile them unconditionally in
> user-mode,
> diff --git a/include/sysemu/tcg.h b/include/sysemu/tcg.h
> index 00349fb18a..7415f11022 100644
> --- a/include/sysemu/tcg.h
> +++ b/include/sysemu/tcg.h
> @@ -9,6 +9,7 @@
> #define SYSEMU_TCG_H
>
> void tcg_exec_init(unsigned long tb_size, int splitwx);
> +void tb_flush_all(void);
Why not declare in "exec/exec-all.h"?