1 #ifndef QEMU_EXEC_LOG_H
2 #define QEMU_EXEC_LOG_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 if (qemu_log_enabled()) {
19 cpu_dump_state(cpu
, qemu_logfile
, fprintf
, flags
);
25 * @mask: Mask when to log.
26 * @cpu: The CPU whose state is to be logged.
27 * @flags: Flags what to log.
29 * Logs the output of cpu_dump_state() if loglevel includes @mask.
31 static inline void log_cpu_state_mask(int mask
, CPUState
*cpu
, int flags
)
33 if (qemu_loglevel
& mask
) {
34 log_cpu_state(cpu
, flags
);
39 /* disas() and target_disas() to qemu_logfile: */
40 static inline void log_target_disas(CPUState
*cpu
, target_ulong start
,
43 target_disas(qemu_logfile
, cpu
, start
, len
);
46 static inline void log_disas(void *code
, unsigned long size
)
48 disas(qemu_logfile
, code
, size
);
51 #if defined(CONFIG_USER_ONLY)
52 /* page_dump() output to the log file: */
53 static inline void log_page_dump(void)
55 page_dump(qemu_logfile
);