Add new tracepoint in KVM
authorMohamad Gebai <mohamad.gebai@polymtl.ca>
Wed, 9 Oct 2013 01:49:32 +0000 (21:49 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 10 Oct 2013 14:36:03 +0000 (10:36 -0400)
New tracepoint added in kvm: kvm_write_tsc_offset.

Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/arch/x86/kvm/trace.h
instrumentation/events/mainline/arch/x86/kvm/trace.h

index 8e71a7f51f5562db7e3727788b9321e01b2c95d7..5eec16908d36b0ad3475524291b534bb4f2275cd 100644 (file)
@@ -761,6 +761,29 @@ TRACE_EVENT(
                  __entry->gpa_match ? "GPA" : "GVA")
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+TRACE_EVENT(kvm_write_tsc_offset,
+       TP_PROTO(unsigned int vcpu_id, __u64 previous_tsc_offset,
+                __u64 next_tsc_offset),
+       TP_ARGS(vcpu_id, previous_tsc_offset, next_tsc_offset),
+
+       TP_STRUCT__entry(
+               __field( unsigned int,  vcpu_id                         )
+               __field(        __u64,  previous_tsc_offset             )
+               __field(        __u64,  next_tsc_offset                 )
+       ),
+
+       TP_fast_assign(
+               tp_assign(vcpu_id, vcpu_id)
+               tp_assign(previous_tsc_offset, previous_tsc_offset)
+               tp_assign(next_tsc_offset, next_tsc_offset)
+       ),
+
+       TP_printk("vcpu=%u prev=%llu next=%llu", __entry->vcpu_id,
+                 __entry->previous_tsc_offset, __entry->next_tsc_offset)
+)
+#endif
+
 #ifdef CONFIG_X86_64
 
 #define host_clocks                                    \
index fe5e00ed70369c129442a61df519bfe1823f6112..545245d7cc63f3128879724a1fc2811c31bdf55c 100644 (file)
@@ -756,6 +756,27 @@ TRACE_EVENT(
                  __entry->gpa_match ? "GPA" : "GVA")
 );
 
+TRACE_EVENT(kvm_write_tsc_offset,
+       TP_PROTO(unsigned int vcpu_id, __u64 previous_tsc_offset,
+                __u64 next_tsc_offset),
+       TP_ARGS(vcpu_id, previous_tsc_offset, next_tsc_offset),
+
+       TP_STRUCT__entry(
+               __field( unsigned int,  vcpu_id                         )
+               __field(        __u64,  previous_tsc_offset             )
+               __field(        __u64,  next_tsc_offset                 )
+       ),
+
+       TP_fast_assign(
+               __entry->vcpu_id                = vcpu_id;
+               __entry->previous_tsc_offset    = previous_tsc_offset;
+               __entry->next_tsc_offset        = next_tsc_offset;
+       ),
+
+       TP_printk("vcpu=%u prev=%llu next=%llu", __entry->vcpu_id,
+                 __entry->previous_tsc_offset, __entry->next_tsc_offset)
+);
+
 #ifdef CONFIG_X86_64
 
 #define host_clocks                                    \
This page took 0.026917 seconds and 4 git commands to generate.