[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/29] tco: add trace events
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 13/29] tco: add trace events |
Date: |
Wed, 18 Oct 2017 18:12:05 +0200 |
Add trace events to the PCH watchdog timer, it can be useful to see how
the guest is using it.
Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/acpi/tco.c | 11 +++++++++--
hw/acpi/trace-events | 4 ++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/tco.c b/hw/acpi/tco.c
index 05b9d7b..a914396 100644
--- a/hw/acpi/tco.c
+++ b/hw/acpi/tco.c
@@ -12,6 +12,7 @@
#include "hw/i386/ich9.h"
#include "hw/acpi/tco.h"
+#include "trace.h"
//#define DEBUG
@@ -41,8 +42,11 @@ enum {
static inline void tco_timer_reload(TCOIORegs *tr)
{
- tr->expire_time = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) +
- ((int64_t)(tr->tco.tmr & TCO_TMR_MASK) * TCO_TICK_NSEC);
+ int ticks = tr->tco.tmr & TCO_TMR_MASK;
+ int64_t nsec = (int64_t)ticks * TCO_TICK_NSEC;
+
+ trace_tco_timer_reload(ticks, nsec / 1000000);
+ tr->expire_time = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + nsec;
timer_mod(tr->tco_timer, tr->expire_time);
}
@@ -59,6 +63,9 @@ static void tco_timer_expired(void *opaque)
ICH9LPCState *lpc = container_of(pm, ICH9LPCState, pm);
uint32_t gcs = pci_get_long(lpc->chip_config + ICH9_CC_GCS);
+ trace_tco_timer_expired(tr->timeouts_no,
+ lpc->pin_strap.spkr_hi,
+ !!(gcs & ICH9_CC_GCS_NO_REBOOT));
tr->tco.rld = 0;
tr->tco.sts1 |= TCO_TIMEOUT;
if (++tr->timeouts_no == 2) {
diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events
index e3b41e9..df0024f 100644
--- a/hw/acpi/trace-events
+++ b/hw/acpi/trace-events
@@ -30,3 +30,7 @@ cpuhp_acpi_ejecting_invalid_cpu(uint32_t idx) "0x%"PRIx32
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
+
+# hw/acpi/tco.c
+tco_timer_reload(int ticks, int msec) "ticks=%d (%d ms)"
+tco_timer_expired(int timeouts_no, bool strap, bool no_reboot) "timeouts_no=%d
no_reboot=%d/%d"
--
1.8.3.1
- [Qemu-devel] [PULL 02/29] scsi-disk: support reporting of rotation rate, (continued)
- [Qemu-devel] [PULL 02/29] scsi-disk: support reporting of rotation rate, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 04/29] char: don't skip client cleanup if 'connected' flag is unset, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 01/29] checkpatch: refine mode selection, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 07/29] memory: fix off-by-one error in memory_region_notify_one(), Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 05/29] exec: add page_mask for flatview_do_translate, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 03/29] ide: support reporting of rotation rate, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 06/29] exec: simplify address_space_get_iotlb_entry, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 08/29] pc: make sure that plugged CPUs are of the same type, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 09/29] disas: Always initialize read_memory_inner_func properly, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 10/29] build: remove CONFIG_LIBDECNUMBER, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 13/29] tco: add trace events,
Paolo Bonzini <=
- [Qemu-devel] [PULL 11/29] nios2: define tcg_env, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 17/29] kvm: fix alignment of ram address, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 15/29] target/i386: trap on instructions longer than >15 bytes, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 12/29] docs/devel/loads-stores.rst: Document our various load and store APIs, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 14/29] target/i386: introduce x86_ld*_code, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 19/29] kvm: fix error message when failing to unregister slot, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 16/29] memory: call log_start after region_add, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 18/29] kvm: tolerate non-existing slot for log_start/log_stop/log_sync, Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 22/29] memory: reuse section_from_flat_range(), Paolo Bonzini, 2017/10/18
- [Qemu-devel] [PULL 21/29] kvm: simplify kvm_align_section(), Paolo Bonzini, 2017/10/18