[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 49/87] hw/i386/pc: Convert DPRINTF() to trace events
From: |
Paolo Bonzini |
Subject: |
[PULL 49/87] hw/i386/pc: Convert DPRINTF() to trace events |
Date: |
Wed, 18 Dec 2019 13:02:15 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Convert the deprecated DPRINTF() macro to trace events.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/i386/pc.c | 19 +++++--------------
hw/i386/trace-events | 6 ++++++
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index e330a91..d3075e7 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -91,16 +91,7 @@
#include "config-devices.h"
#include "e820_memory_layout.h"
#include "fw_cfg.h"
-
-/* debug PC/ISA interrupts */
-//#define DEBUG_IRQ
-
-#ifdef DEBUG_IRQ
-#define DPRINTF(fmt, ...) \
- do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...)
-#endif
+#include "trace.h"
GlobalProperty pc_compat_4_2[] = {};
const size_t pc_compat_4_2_len = G_N_ELEMENTS(pc_compat_4_2);
@@ -350,7 +341,7 @@ void gsi_handler(void *opaque, int n, int level)
{
GSIState *s = opaque;
- DPRINTF("pc: %s GSI %d\n", level ? "raising" : "lowering", n);
+ trace_pc_gsi_interrupt(n, level);
if (n < ISA_NUM_IRQS) {
qemu_set_irq(s->i8259_irq[n], level);
}
@@ -428,7 +419,7 @@ static void pic_irq_request(void *opaque, int irq, int
level)
CPUState *cs = first_cpu;
X86CPU *cpu = X86_CPU(cs);
- DPRINTF("pic_irqs: %s irq %d\n", level? "raise" : "lower", irq);
+ trace_pc_pic_interrupt(irq, level);
if (cpu->apic_state && !kvm_irqchip_in_kernel()) {
CPU_FOREACH(cs) {
cpu = X86_CPU(cs);
@@ -762,7 +753,7 @@ static void port92_write(void *opaque, hwaddr addr,
uint64_t val,
Port92State *s = opaque;
int oldval = s->outport;
- DPRINTF("port92: write 0x%02" PRIx64 "\n", val);
+ trace_port92_write(val);
s->outport = val;
qemu_set_irq(s->a20_out, (val >> 1) & 1);
if ((val & 1) && !(oldval & 1)) {
@@ -777,7 +768,7 @@ static uint64_t port92_read(void *opaque, hwaddr addr,
uint32_t ret;
ret = s->outport;
- DPRINTF("port92: read 0x%02x\n", ret);
+ trace_port92_read(ret);
return ret;
}
diff --git a/hw/i386/trace-events b/hw/i386/trace-events
index c8bc464..43f33cf 100644
--- a/hw/i386/trace-events
+++ b/hw/i386/trace-events
@@ -111,3 +111,9 @@ amdvi_ir_irte_ga_val(uint64_t hi, uint64_t lo) "hi
0x%"PRIx64" lo 0x%"PRIx64
# vmport.c
vmport_register(unsigned char command, void *func, void *opaque) "command:
0x%02x func: %p opaque: %p"
vmport_command(unsigned char command) "command: 0x%02x"
+
+# pc.c
+pc_gsi_interrupt(int irqn, int level) "GSI interrupt #%d level:%d"
+pc_pic_interrupt(int irqn, int level) "PIC interrupt #%d level:%d"
+port92_read(uint8_t val) "port92: read 0x%02x"
+port92_write(uint8_t val) "port92: write 0x%02x"
--
1.8.3.1
- [PULL 37/87] os-posix: simplify os_find_datadir, (continued)
- [PULL 37/87] os-posix: simplify os_find_datadir, Paolo Bonzini, 2019/12/18
- [PULL 39/87] libvixl: remove per-target compiler flags, Paolo Bonzini, 2019/12/18
- [PULL 29/87] kvm: convert "-machine kernel_irqchip" to an accelerator property, Paolo Bonzini, 2019/12/18
- [PULL 40/87] crypto: move common bits for all emulators to libqemuutil, Paolo Bonzini, 2019/12/18
- [PULL 44/87] i386: conditionally compile more files, Paolo Bonzini, 2019/12/18
- [PULL 42/87] configure: set $PYTHON to a full path, Paolo Bonzini, 2019/12/18
- [PULL 45/87] fw_cfg: allow building without other devices, Paolo Bonzini, 2019/12/18
- [PULL 47/87] pci-stub: add more MSI functions, Paolo Bonzini, 2019/12/18
- [PULL 48/87] x86: move SMM property to X86MachineState, Paolo Bonzini, 2019/12/18
- [PULL 46/87] hw: replace hw/i386/pc.h with a header just for the i8259, Paolo Bonzini, 2019/12/18
- [PULL 49/87] hw/i386/pc: Convert DPRINTF() to trace events,
Paolo Bonzini <=
- [PULL 50/87] x86: move more x86-generic functions out of PC files, Paolo Bonzini, 2019/12/18
- [PULL 51/87] acpi: move PC stubs out of stubs/, Paolo Bonzini, 2019/12/18
- [PULL 52/87] pc: stubify x86 iommu, Paolo Bonzini, 2019/12/18
- [PULL 53/87] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler(), Paolo Bonzini, 2019/12/18
- [PULL 55/87] hw/isa/isa-bus: cleanup irq functions, Paolo Bonzini, 2019/12/18
- [PULL 54/87] hw/i386: Simplify ioapic_init_gsi(), Paolo Bonzini, 2019/12/18
- [PULL 57/87] hw/i386/pc: Inline port92_init(), Paolo Bonzini, 2019/12/18
- [PULL 56/87] hw/i386/pc: Use TYPE_PORT92 instead of hardcoded string, Paolo Bonzini, 2019/12/18
- [PULL 58/87] hw/i386/pc: Extract the port92 device, Paolo Bonzini, 2019/12/18
- [PULL 59/87] hyperv: Use auto rcu_read macros, Paolo Bonzini, 2019/12/18