Patchwork [3/5] kvm-all: add kvm_run_exit tracepoint

login
register
mail settings
Submitter Kazuya Saito
Date March 22, 2013, 8:28 a.m.
Message ID <514C162D.10307@jp.fujitsu.com>
Download mbox | patch
Permalink /patch/229908/
State New
Headers show

Comments

Kazuya Saito - March 22, 2013, 8:28 a.m.
This patch enable us to know exit reason of KVM_RUN. It will help us
know where the trouble is caused.

Signed-off-by: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
---
 kvm-all.c    |    1 +
 trace-events |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
Paolo Bonzini - March 22, 2013, 11:12 a.m.
Il 22/03/2013 09:28, Kazuya Saito ha scritto:
> This patch enable us to know exit reason of KVM_RUN. It will help us
> know where the trouble is caused.
> 
> Signed-off-by: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
> ---
>  kvm-all.c    |    1 +
>  trace-events |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index da15623..29fca13 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1576,6 +1576,7 @@ int kvm_cpu_exec(CPUArchState *env)
>              abort();
>          }
> 
> +        trace_kvm_run_exit(run->exit_reason);
>          switch (run->exit_reason) {
>          case KVM_EXIT_IO:
>              DPRINTF("handle_io\n");
> diff --git a/trace-events b/trace-events
> index 1af7060..c691ce4 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -1101,3 +1101,4 @@ migrate_set_state(int new_state) "new state %d"
>  kvm_ioctl(int type) "type %d"
>  kvm_vm_ioctl(int type) "type %d"
>  kvm_vcpu_ioctl(int type) "type %d"
> +kvm_run_exit(uint32_t reason) "reason %d"
> 

Please add the CPU number here, too.

Paolo

Patch

diff --git a/kvm-all.c b/kvm-all.c
index da15623..29fca13 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1576,6 +1576,7 @@  int kvm_cpu_exec(CPUArchState *env)
             abort();
         }

+        trace_kvm_run_exit(run->exit_reason);
         switch (run->exit_reason) {
         case KVM_EXIT_IO:
             DPRINTF("handle_io\n");
diff --git a/trace-events b/trace-events
index 1af7060..c691ce4 100644
--- a/trace-events
+++ b/trace-events
@@ -1101,3 +1101,4 @@  migrate_set_state(int new_state) "new state %d"
 kvm_ioctl(int type) "type %d"
 kvm_vm_ioctl(int type) "type %d"
 kvm_vcpu_ioctl(int type) "type %d"
+kvm_run_exit(uint32_t reason) "reason %d"