qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] trace: Trace vm_start()/vm_stop()
@ 2010-11-16 12:20 Stefan Hajnoczi
  2010-11-21 15:20 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2010-11-16 12:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Prerna Saxena

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 <stefanha@linux.vnet.ibm.com>
---
 trace-events |    3 +++
 vl.c         |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/trace-events b/trace-events
index 947f8b0..da03d4b 100644
--- a/trace-events
+++ b/trace-events
@@ -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"
diff --git a/vl.c b/vl.c
index c58583d..87e76ad 100644
--- a/vl.c
+++ b/vl.c
@@ -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);
     }
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] trace: Trace vm_start()/vm_stop()
  2010-11-16 12:20 [Qemu-devel] [PATCH] trace: Trace vm_start()/vm_stop() Stefan Hajnoczi
@ 2010-11-21 15:20 ` Anthony Liguori
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2010-11-21 15:20 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Prerna Saxena

On 11/16/2010 06:20 AM, Stefan Hajnoczi wrote:
> 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<stefanha@linux.vnet.ibm.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   trace-events |    3 +++
>   vl.c         |    3 +++
>   2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/trace-events b/trace-events
> index 947f8b0..da03d4b 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -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"
> diff --git a/vl.c b/vl.c
> index c58583d..87e76ad 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -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);
>       }
>    

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-21 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 12:20 [Qemu-devel] [PATCH] trace: Trace vm_start()/vm_stop() Stefan Hajnoczi
2010-11-21 15:20 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).