trace: Trace vm_start()/vm_stop()
PATCH 1/1 trace: Trace vm_start()/vm_stop()
VM state change notifications are invoked from vm_start()/vm_stop(). Trace these state changes so we can reason about the state of the VM from trace output.
Signed-off-by Stefan Hajnoczi <[email protected]>
--- trace-events | 3 +++ vl.c | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-)
trace-events +3 -0
@@ -189,3 +189,6 @@ disable sun4m_iommu_mem_writel_pgflush(uint32_t val) "page flush %x" disable sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags addr %"PRIx64" => pte %"PRIx64", *pte = %x" disable sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %"PRIx64" => pa %"PRIx64" iopte = %x" disable sun4m_iommu_bad_addr(uint64_t addr) "bad addr %"PRIx64"" + +# vl.c +disable vm_state_notify(int running, int reason) "running %d reason %d"
vl.c +3 -0
@@ -158,6 +158,7 @@ int main(int argc, char **argv)#include "slirp/libslirp.h" +#include "trace.h" #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h"
@@ -1074,6 +1075,8 @@ void vm_state_notify(int running, int reason) {VMChangeStateEntry *e; +trace_vm_state_notify (running, reason); +for (e = vm_change_state_head.lh_first; e; e = e->entries.le_next) { e->cb (e->opaque, running, reason); }
Signature · 1 line
1.7.2.3
Anthony Liguori
AppliedQuoted 6 lines · Stefan Hajnoczi
VM state change notifications are invoked from vm_start()/vm_stop(). Trace these state changes so we can reason about the state of the VM from trace output.
Signed-off-by Stefan Hajnoczi<[email protected]>
Applied. Thanks.
Regards,
Anthony Liguori
Quoted 38 lines
--- trace-events | 3 +++ vl.c | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-)trace-events +3
-0@@ -189,3 +189,6 @@ disable sun4m_iommu_mem_writel_pgflush(uint32_t val) "page flush %x" disable sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags addr %"PRIx64" => pte %"PRIx64", *pte = %x" disable sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %"PRIx64" => pa %"PRIx64" iopte = %x" disable sun4m_iommu_bad_addr(uint64_t addr) "bad addr %"PRIx64"" + +# vl.c +disable vm_state_notify(int running, int reason) "running %d reason %d"vl.c +3
-0@@ -158,6 +158,7 @@ int main(int argc, char **argv)#include "slirp/libslirp.h" +#include "trace.h" #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h" @@ -1074,6 +1075,8 @@ void vm_state_notify(int running, int reason) {VMChangeStateEntry *e; +trace_vm_state_notify (running, reason); +for (e = vm_change_state_head.lh_first; e; e = e->entries.le_next) { e->cb (e->opaque, running, reason); }