log.h (66706192de113c82ecf849f6943878c453b5d2ba) | log.h (d73415a315471ac0b127ed3fad45c8ec5d711de1) |
---|---|
1#ifndef QEMU_EXEC_LOG_H 2#define QEMU_EXEC_LOG_H 3 4#include "qemu/log.h" 5#include "hw/core/cpu.h" 6#include "disas/disas.h" 7 8/* cpu_dump_state() logging functions: */ --- 5 unchanged lines hidden (view full) --- 14 * Logs the output of cpu_dump_state(). 15 */ 16static inline void log_cpu_state(CPUState *cpu, int flags) 17{ 18 QemuLogFile *logfile; 19 20 if (qemu_log_enabled()) { 21 rcu_read_lock(); | 1#ifndef QEMU_EXEC_LOG_H 2#define QEMU_EXEC_LOG_H 3 4#include "qemu/log.h" 5#include "hw/core/cpu.h" 6#include "disas/disas.h" 7 8/* cpu_dump_state() logging functions: */ --- 5 unchanged lines hidden (view full) --- 14 * Logs the output of cpu_dump_state(). 15 */ 16static inline void log_cpu_state(CPUState *cpu, int flags) 17{ 18 QemuLogFile *logfile; 19 20 if (qemu_log_enabled()) { 21 rcu_read_lock(); |
22 logfile = atomic_rcu_read(&qemu_logfile); | 22 logfile = qatomic_rcu_read(&qemu_logfile); |
23 if (logfile) { 24 cpu_dump_state(cpu, logfile->fd, flags); 25 } 26 rcu_read_unlock(); 27 } 28} 29 30/** --- 13 unchanged lines hidden (view full) --- 44 45#ifdef NEED_CPU_H 46/* disas() and target_disas() to qemu_logfile: */ 47static inline void log_target_disas(CPUState *cpu, target_ulong start, 48 target_ulong len) 49{ 50 QemuLogFile *logfile; 51 rcu_read_lock(); | 23 if (logfile) { 24 cpu_dump_state(cpu, logfile->fd, flags); 25 } 26 rcu_read_unlock(); 27 } 28} 29 30/** --- 13 unchanged lines hidden (view full) --- 44 45#ifdef NEED_CPU_H 46/* disas() and target_disas() to qemu_logfile: */ 47static inline void log_target_disas(CPUState *cpu, target_ulong start, 48 target_ulong len) 49{ 50 QemuLogFile *logfile; 51 rcu_read_lock(); |
52 logfile = atomic_rcu_read(&qemu_logfile); | 52 logfile = qatomic_rcu_read(&qemu_logfile); |
53 if (logfile) { 54 target_disas(logfile->fd, cpu, start, len); 55 } 56 rcu_read_unlock(); 57} 58 59static inline void log_disas(void *code, unsigned long size, const char *note) 60{ 61 QemuLogFile *logfile; 62 rcu_read_lock(); | 53 if (logfile) { 54 target_disas(logfile->fd, cpu, start, len); 55 } 56 rcu_read_unlock(); 57} 58 59static inline void log_disas(void *code, unsigned long size, const char *note) 60{ 61 QemuLogFile *logfile; 62 rcu_read_lock(); |
63 logfile = atomic_rcu_read(&qemu_logfile); | 63 logfile = qatomic_rcu_read(&qemu_logfile); |
64 if (logfile) { 65 disas(logfile->fd, code, size, note); 66 } 67 rcu_read_unlock(); 68} 69 70#if defined(CONFIG_USER_ONLY) 71/* page_dump() output to the log file: */ --- 13 unchanged lines hidden --- | 64 if (logfile) { 65 disas(logfile->fd, code, size, note); 66 } 67 rcu_read_unlock(); 68} 69 70#if defined(CONFIG_USER_ONLY) 71/* page_dump() output to the log file: */ --- 13 unchanged lines hidden --- |