[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 15:05:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 1/22/21 12:42 PM, Alex Bennée wrote:
>
> Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> writes:
>
>> 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
...
> I would call tb_flush(current_cpu) or first_cpu here. But two things:
>
> - I'm not sure you have a CPU at all times qemu_set_log is called
Indeed, with QTest accelerator it is NULL. I also remember
some odd cases when running commands from the monitor.
Regards,
Phil.