1 #ifndef QEMU_EXEC_LOG_H
2 #define QEMU_EXEC_LOG_H
5 #include "hw/core/cpu.h"
6 #include "disas/disas.h"
8 /* cpu_dump_state() logging functions: */
11 * @cpu: The CPU whose state is to be logged.
12 * @flags: Flags what to log.
14 * Logs the output of cpu_dump_state().
16 static inline void log_cpu_state(CPUState
*cpu
, int flags
)
18 FILE *f
= qemu_log_trylock();
20 cpu_dump_state(cpu
, f
, flags
);
27 * @mask: Mask when to log.
28 * @cpu: The CPU whose state is to be logged.
29 * @flags: Flags what to log.
31 * Logs the output of cpu_dump_state() if loglevel includes @mask.
33 static inline void log_cpu_state_mask(int mask
, CPUState
*cpu
, int flags
)
35 if (qemu_loglevel
& mask
) {
36 log_cpu_state(cpu
, flags
);