diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2009-06-17 08:22:14 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:32:59 -0400 |
commit | 229456fc34b1c9031b04f7581e7b755d1cebfe9c (patch) | |
tree | 85fc0b54e9403d6ea059b8f7f78cea49594aaace /virt | |
parent | 219b65dcf6c0bad83d51bfa12e25891c02de2414 (diff) |
KVM: convert custom marker based tracing to event traces
This allows use of the powerful ftrace infrastructure.
See Documentation/trace/ for usage information.
[avi, stephen: various build fixes]
[sheng: fix control register breakage]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/irq_comm.c | 5 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index bb8a1b5e41c..94759ed96b6 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kvm_host.h> | 22 | #include <linux/kvm_host.h> |
23 | #include <trace/events/kvm.h> | ||
23 | 24 | ||
24 | #include <asm/msidef.h> | 25 | #include <asm/msidef.h> |
25 | #ifdef CONFIG_IA64 | 26 | #ifdef CONFIG_IA64 |
@@ -125,6 +126,8 @@ int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level) | |||
125 | unsigned long *irq_state, sig_level; | 126 | unsigned long *irq_state, sig_level; |
126 | int ret = -1; | 127 | int ret = -1; |
127 | 128 | ||
129 | trace_kvm_set_irq(irq); | ||
130 | |||
128 | WARN_ON(!mutex_is_locked(&kvm->irq_lock)); | 131 | WARN_ON(!mutex_is_locked(&kvm->irq_lock)); |
129 | 132 | ||
130 | if (irq < KVM_IOAPIC_NUM_PINS) { | 133 | if (irq < KVM_IOAPIC_NUM_PINS) { |
@@ -161,6 +164,8 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin) | |||
161 | struct hlist_node *n; | 164 | struct hlist_node *n; |
162 | unsigned gsi = pin; | 165 | unsigned gsi = pin; |
163 | 166 | ||
167 | trace_kvm_ack_irq(irqchip, pin); | ||
168 | |||
164 | list_for_each_entry(e, &kvm->irq_routing, link) | 169 | list_for_each_entry(e, &kvm->irq_routing, link) |
165 | if (e->type == KVM_IRQ_ROUTING_IRQCHIP && | 170 | if (e->type == KVM_IRQ_ROUTING_IRQCHIP && |
166 | e->irqchip.irqchip == irqchip && | 171 | e->irqchip.irqchip == irqchip && |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 48d5e697bf4..04bdeddebda 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -59,6 +59,9 @@ | |||
59 | #include "irq.h" | 59 | #include "irq.h" |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #define CREATE_TRACE_POINTS | ||
63 | #include <trace/events/kvm.h> | ||
64 | |||
62 | MODULE_AUTHOR("Qumranet"); | 65 | MODULE_AUTHOR("Qumranet"); |
63 | MODULE_LICENSE("GPL"); | 66 | MODULE_LICENSE("GPL"); |
64 | 67 | ||
@@ -2718,6 +2721,7 @@ EXPORT_SYMBOL_GPL(kvm_init); | |||
2718 | void kvm_exit(void) | 2721 | void kvm_exit(void) |
2719 | { | 2722 | { |
2720 | kvm_trace_cleanup(); | 2723 | kvm_trace_cleanup(); |
2724 | tracepoint_synchronize_unregister(); | ||
2721 | misc_deregister(&kvm_dev); | 2725 | misc_deregister(&kvm_dev); |
2722 | kmem_cache_destroy(kvm_vcpu_cache); | 2726 | kmem_cache_destroy(kvm_vcpu_cache); |
2723 | sysdev_unregister(&kvm_sysdev); | 2727 | sysdev_unregister(&kvm_sysdev); |