On 1/22/21 12:42 PM, Alex Bennée wrote: > > Pavel Dovgalyuk <pavel.dovgal...@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.dovgal...@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.