mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
log: do not unnecessarily include qom/cpu.h
Split the bits that require it to exec/log.h. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-id: 1452174932-28657-8-git-send-email-den@openvz.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
committed by
Stefan Hajnoczi
parent
e9527dd399
commit
508127e243
@@ -33,6 +33,7 @@
|
||||
#include "tcg.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/envlist.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
int singlestep;
|
||||
unsigned long mmap_min_addr;
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "exec/tb-hash.h"
|
||||
#include "exec/log.h"
|
||||
#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
|
||||
#include "hw/i386/apic.h"
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
#include "exec/memory-internal.h"
|
||||
#include "exec/ram_addr.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
#include "qemu/range.h"
|
||||
#ifndef _WIN32
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/acpi/cpu_hotplug.h"
|
||||
#include "qom/cpu.h"
|
||||
|
||||
static uint64_t cpu_status_read(void *opaque, hwaddr addr, unsigned int size)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/bitops.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qom/cpu.h"
|
||||
|
||||
#ifndef A9_GTIMER_ERR_DEBUG
|
||||
#define A9_GTIMER_ERR_DEBUG 0
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
#ifndef QEMU_EXEC_LOG_H
|
||||
#define QEMU_EXEC_LOG_H
|
||||
|
||||
#include "qemu/log.h"
|
||||
#include "qom/cpu.h"
|
||||
#include "disas/disas.h"
|
||||
|
||||
/* cpu_dump_state() logging functions: */
|
||||
/**
|
||||
* log_cpu_state:
|
||||
* @cpu: The CPU whose state is to be logged.
|
||||
* @flags: Flags what to log.
|
||||
*
|
||||
* Logs the output of cpu_dump_state().
|
||||
*/
|
||||
static inline void log_cpu_state(CPUState *cpu, int flags)
|
||||
{
|
||||
if (qemu_log_enabled()) {
|
||||
cpu_dump_state(cpu, qemu_logfile, fprintf, flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* log_cpu_state_mask:
|
||||
* @mask: Mask when to log.
|
||||
* @cpu: The CPU whose state is to be logged.
|
||||
* @flags: Flags what to log.
|
||||
*
|
||||
* Logs the output of cpu_dump_state() if loglevel includes @mask.
|
||||
*/
|
||||
static inline void log_cpu_state_mask(int mask, CPUState *cpu, int flags)
|
||||
{
|
||||
if (qemu_loglevel & mask) {
|
||||
log_cpu_state(cpu, flags);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NEED_CPU_H
|
||||
/* disas() and target_disas() to qemu_logfile: */
|
||||
static inline void log_target_disas(CPUState *cpu, target_ulong start,
|
||||
target_ulong len, int flags)
|
||||
{
|
||||
target_disas(qemu_logfile, cpu, start, len, flags);
|
||||
}
|
||||
|
||||
static inline void log_disas(void *code, unsigned long size)
|
||||
{
|
||||
disas(qemu_logfile, code, size);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
/* page_dump() output to the log file: */
|
||||
static inline void log_page_dump(void)
|
||||
{
|
||||
page_dump(qemu_logfile);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,10 +5,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include "qemu/compiler.h"
|
||||
#include "qom/cpu.h"
|
||||
#ifdef NEED_CPU_H
|
||||
#include "disas/disas.h"
|
||||
#endif
|
||||
|
||||
/* Private global variables, don't use */
|
||||
extern FILE *qemu_logfile;
|
||||
@@ -78,61 +74,6 @@ qemu_log_vprintf(const char *fmt, va_list va)
|
||||
void GCC_FMT_ATTR(2, 3) qemu_log_mask(int mask, const char *fmt, ...);
|
||||
|
||||
|
||||
/* Special cases: */
|
||||
|
||||
/* cpu_dump_state() logging functions: */
|
||||
/**
|
||||
* log_cpu_state:
|
||||
* @cpu: The CPU whose state is to be logged.
|
||||
* @flags: Flags what to log.
|
||||
*
|
||||
* Logs the output of cpu_dump_state().
|
||||
*/
|
||||
static inline void log_cpu_state(CPUState *cpu, int flags)
|
||||
{
|
||||
if (qemu_log_enabled()) {
|
||||
cpu_dump_state(cpu, qemu_logfile, fprintf, flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* log_cpu_state_mask:
|
||||
* @mask: Mask when to log.
|
||||
* @cpu: The CPU whose state is to be logged.
|
||||
* @flags: Flags what to log.
|
||||
*
|
||||
* Logs the output of cpu_dump_state() if loglevel includes @mask.
|
||||
*/
|
||||
static inline void log_cpu_state_mask(int mask, CPUState *cpu, int flags)
|
||||
{
|
||||
if (qemu_loglevel & mask) {
|
||||
log_cpu_state(cpu, flags);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NEED_CPU_H
|
||||
/* disas() and target_disas() to qemu_logfile: */
|
||||
static inline void log_target_disas(CPUState *cpu, target_ulong start,
|
||||
target_ulong len, int flags)
|
||||
{
|
||||
target_disas(qemu_logfile, cpu, start, len, flags);
|
||||
}
|
||||
|
||||
static inline void log_disas(void *code, unsigned long size)
|
||||
{
|
||||
disas(qemu_logfile, code, size);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
/* page_dump() output to the log file: */
|
||||
static inline void log_page_dump(void)
|
||||
{
|
||||
page_dump(qemu_logfile);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Maintenance: */
|
||||
|
||||
/* fflush() the log file */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/envlist.h"
|
||||
#include "elf.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
char *exec_path;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "sysemu/kvm.h"
|
||||
#include "qemu/notify.h"
|
||||
#include "qemu/log.h"
|
||||
#include "exec/log.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "exec/helper-gen.h"
|
||||
|
||||
#include "trace-tcg.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
|
||||
#undef ALPHA_DEBUG_DISAS
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "exec/helper-proto.h"
|
||||
#include "exec/helper-gen.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
#include "trace-tcg.h"
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "exec/helper-gen.h"
|
||||
|
||||
#include "trace-tcg.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
|
||||
#define ENABLE_ARCH_4T arm_dc_feature(s, ARM_FEATURE_V4T)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "exec/helper-gen.h"
|
||||
|
||||
#include "trace-tcg.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
|
||||
#define DISAS_CRIS 0
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "qemu/log.h"
|
||||
#include "exec/helper-proto.h"
|
||||
#include "exec/cpu_ldst.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
//#define DEBUG_PCALL
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "exec/helper-proto.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
/* SMM support */
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "exec/helper-gen.h"
|
||||
|
||||
#include "trace-tcg.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
|
||||
#define PREFIX_REPZ 0x01
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "qemu/host-utils.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "exec/semihost.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
int lm32_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw,
|
||||
int mmu_idx)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "exec/helper-gen.h"
|
||||
|
||||
#include "trace-tcg.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
|
||||
#define DISAS_LM32 1
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "exec/helper-gen.h"
|
||||
|
||||
#include "trace-tcg.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
|
||||
//#define DEBUG_DISPATCH 1
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "qemu/host-utils.h"
|
||||
#include "exec/log.h"
|
||||
|
||||
#define D(x)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user