[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/37] acpi/pcihp: Convert debug printf()s to trace e
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 12/37] acpi/pcihp: Convert debug printf()s to trace events |
Date: |
Thu, 16 May 2019 08:19:08 -0400 |
From: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/acpi/pcihp.c | 25 ++++++++-----------------
hw/acpi/trace-events | 9 +++++++++
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 88e4ae1bcd..7729c5338b 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -37,14 +37,7 @@
#include "hw/pci/pci_bus.h"
#include "qapi/error.h"
#include "qom/qom-qobject.h"
-
-//#define DEBUG
-
-#ifdef DEBUG
-# define ACPI_PCIHP_DPRINTF(format, ...) printf(format, ## __VA_ARGS__)
-#else
-# define ACPI_PCIHP_DPRINTF(format, ...) do { } while (0)
-#endif
+#include "trace.h"
#define ACPI_PCIHP_ADDR 0xae00
#define ACPI_PCIHP_SIZE 0x0014
@@ -306,23 +299,23 @@ static uint64_t pci_read(void *opaque, hwaddr addr,
unsigned int size)
if (!s->legacy_piix) {
s->acpi_pcihp_pci_status[bsel].up = 0;
}
- ACPI_PCIHP_DPRINTF("pci_up_read %" PRIu32 "\n", val);
+ trace_acpi_pci_up_read(val);
break;
case PCI_DOWN_BASE:
val = s->acpi_pcihp_pci_status[bsel].down;
- ACPI_PCIHP_DPRINTF("pci_down_read %" PRIu32 "\n", val);
+ trace_acpi_pci_down_read(val);
break;
case PCI_EJ_BASE:
/* No feature defined yet */
- ACPI_PCIHP_DPRINTF("pci_features_read %" PRIu32 "\n", val);
+ trace_acpi_pci_features_read(val);
break;
case PCI_RMV_BASE:
val = s->acpi_pcihp_pci_status[bsel].hotplug_enable;
- ACPI_PCIHP_DPRINTF("pci_rmv_read %" PRIu32 "\n", val);
+ trace_acpi_pci_rmv_read(val);
break;
case PCI_SEL_BASE:
val = s->hotplug_select;
- ACPI_PCIHP_DPRINTF("pci_sel_read %" PRIu32 "\n", val);
+ trace_acpi_pci_sel_read(val);
default:
break;
}
@@ -340,13 +333,11 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t
data,
break;
}
acpi_pcihp_eject_slot(s, s->hotplug_select, data);
- ACPI_PCIHP_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PRIu64 "\n",
- addr, data);
+ trace_acpi_pci_ej_write(addr, data);
break;
case PCI_SEL_BASE:
s->hotplug_select = s->legacy_piix ? ACPI_PCIHP_BSEL_DEFAULT : data;
- ACPI_PCIHP_DPRINTF("pcisel write %" HWADDR_PRIx " <== %" PRIu64 "\n",
- addr, data);
+ trace_acpi_pci_sel_write(addr, data);
default:
break;
}
diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events
index 825b25cbb0..98a56baa6f 100644
--- a/hw/acpi/trace-events
+++ b/hw/acpi/trace-events
@@ -31,6 +31,15 @@ cpuhp_acpi_ejecting_cpu(uint32_t idx) "0x%"PRIx32
cpuhp_acpi_write_ost_ev(uint32_t slot, uint32_t ev) "idx[0x%"PRIx32"] OST
EVENT: 0x%"PRIx32
cpuhp_acpi_write_ost_status(uint32_t slot, uint32_t st) "idx[0x%"PRIx32"] OST
STATUS: 0x%"PRIx32
+# pcihp.c
+acpi_pci_up_read(uint32_t val) "%" PRIu32
+acpi_pci_down_read(uint32_t val) "%" PRIu32
+acpi_pci_features_read(uint32_t val) "%" PRIu32
+acpi_pci_rmv_read(uint32_t val) "%" PRIu32
+acpi_pci_sel_read(uint32_t val) "%" PRIu32
+acpi_pci_ej_write(uint64_t addr, uint64_t data) "0x%" PRIx64 " <== %" PRIu64
+acpi_pci_sel_write(uint64_t addr, uint64_t data) "0x%" PRIx64 " <== %" PRIu64
+
# piix4.c
piix4_gpe_readb(uint64_t addr, unsigned width, uint64_t val) "addr: 0x%"
PRIx64 " width: %d ==> 0x%" PRIx64
piix4_gpe_writeb(uint64_t addr, unsigned width, uint64_t val) "addr: 0x%"
PRIx64 " width: %d <== 0x%" PRIx64
--
MST
- [Qemu-devel] [PULL 02/37] Revert "globals: Allow global properties to be optional", (continued)
- [Qemu-devel] [PULL 02/37] Revert "globals: Allow global properties to be optional", Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 03/37] docs: reST-ify vhost-user documentation, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 04/37] virtio: Introduce started flag to VirtioDevice, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 05/37] virtio: Use started flag in virtio_vmstate_change(), Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 06/37] vhost-user-blk: Use started flag in vhost_user_blk_set_status(), Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 07/37] vhost-user-blk: Only start vhost-user backend with the first kick, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 08/37] vhost-user-blk: Add return value for vhost_user_blk_start(), Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 09/37] vhost-user-blk: Add support to reconnect backend, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 10/37] contrib/vhost-user-blk: enable inflight I/O tracking, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 11/37] acpi/piix4: Convert debug printf()s to trace events, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 12/37] acpi/pcihp: Convert debug printf()s to trace events,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 13/37] acpi/pcihp: Add a few more trace points related to unplug, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 14/37] q35: acpi: do not create dummy MCFG table, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 15/37] do not call vhost_net_cleanup() on running net from char user event, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 16/37] hw/arm/virt-acpi-build: remove unnecessary variable mcfg_start, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 17/37] i386, acpi: remove mcfg_ prefix in AcpiMcfgInfo members, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 18/37] hw/arm/virt-acpi-build: pass AcpiMcfgInfo to build_mcfg(), Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 19/37] hw/acpi: Consolidate build_mcfg to pci.c, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 20/37] libvhost-user: fix bad vu_log_write, Michael S. Tsirkin, 2019/05/16