Commit 508127e2 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Stefan Hajnoczi

log: do not unnecessarily include qom/cpu.h

Split the bits that require it to exec/log.h.
Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: 's avatarDenis V. Lunev <den@openvz.org>
Acked-by: 's avatarChristian Borntraeger <borntraeger@de.ibm.com>
Message-id: 1452174932-28657-8-git-send-email-den@openvz.org
Signed-off-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
parent e9527dd3
......@@ -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
......
#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)
......
......@@ -28,6 +28,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
#define SIM_COMPAT 0
......
......@@ -21,6 +21,7 @@
#include "cpu.h"
#include "sysemu/kvm.h"
#include "exec/cpu_ldst.h"
#include "exec/log.h"
enum {
TLBRET_XI = -6,
......
......@@ -33,6 +33,7 @@
#include "exec/semihost.h"
#include "trace-tcg.h"
#include "exec/log.h"
#define MIPS_DEBUG_DISAS 0
......
......@@ -31,6 +31,7 @@
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
#include "exec/log.h"
/* This is the state at translation time. */
typedef struct DisasContext {
......
......@@ -32,6 +32,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
#define OPENRISC_DISAS
......
......@@ -24,6 +24,7 @@
#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "mmu-hash32.h"
#include "exec/log.h"
//#define DEBUG_BAT
......
......@@ -25,6 +25,7 @@
#include "qemu/error-report.h"
#include "kvm_ppc.h"
#include "mmu-hash64.h"
#include "exec/log.h"
//#define DEBUG_SLB
......
......@@ -24,6 +24,7 @@
#include "mmu-hash64.h"
#include "mmu-hash32.h"
#include "exec/cpu_ldst.h"
#include "exec/log.h"
//#define DEBUG_MMU
//#define DEBUG_BATS
......
......@@ -29,6 +29,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
#define CPU_SINGLE_STEP 0x1
......
......@@ -44,6 +44,7 @@ static TCGv_ptr cpu_env;
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
/* Information that (most) every instruction needs to manipulate. */
......
......@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/log.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/sh4/sh_intc.h"
......
......@@ -29,6 +29,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
typedef struct DisasContext {
......
......@@ -21,6 +21,7 @@
#include "cpu.h"
#include "trace.h"
#include "sysemu/sysemu.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"
#include "trace.h"
#define DEBUG_PCALL
......
......@@ -29,6 +29,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
#define DEBUG_DISAS
......
......@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/log.h"
#include "exec/log.h"
#include "disas/disas.h"
#include "tcg-op.h"
#include "exec/cpu_ldst.h"
......
......@@ -28,6 +28,7 @@
#include "exec/helper-gen.h"
#include "tricore-opcodes.h"
#include "exec/log.h"
/*
* TCG registers
......
......@@ -20,6 +20,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
/* internal defines */
......
......@@ -43,6 +43,7 @@
#include "exec/helper-gen.h"
#include "trace-tcg.h"
#include "exec/log.h"
typedef struct DisasContext {
......
......@@ -60,6 +60,7 @@
#endif
#include "elf.h"
#include "exec/log.h"
/* Forward declarations for functions declared in tcg-target.c and used here. */
static void tcg_target_init(TCGContext *s);
......
......@@ -55,6 +55,7 @@
#include "translate-all.h"
#include "qemu/bitmap.h"
#include "qemu/timer.h"
#include "exec/log.h"
//#define DEBUG_TB_INVALIDATE
//#define DEBUG_FLUSH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment