|
5 | 5 | #include <asm/vmx.h>
|
6 | 6 | #include <asm/svm.h>
|
7 | 7 | #include <asm/clocksource.h>
|
| 8 | +#include <asm/pvclock-abi.h> |
8 | 9 |
|
9 | 10 | #undef TRACE_SYSTEM
|
10 | 11 | #define TRACE_SYSTEM kvm
|
@@ -877,6 +878,42 @@ TRACE_EVENT(kvm_ple_window,
|
877 | 878 | #define trace_kvm_ple_window_shrink(vcpu_id, new, old) \
|
878 | 879 | trace_kvm_ple_window(false, vcpu_id, new, old)
|
879 | 880 |
|
| 881 | +TRACE_EVENT(kvm_pvclock_update, |
| 882 | + TP_PROTO(unsigned int vcpu_id, struct pvclock_vcpu_time_info *pvclock), |
| 883 | + TP_ARGS(vcpu_id, pvclock), |
| 884 | + |
| 885 | + TP_STRUCT__entry( |
| 886 | + __field( unsigned int, vcpu_id ) |
| 887 | + __field( __u32, version ) |
| 888 | + __field( __u64, tsc_timestamp ) |
| 889 | + __field( __u64, system_time ) |
| 890 | + __field( __u32, tsc_to_system_mul ) |
| 891 | + __field( __s8, tsc_shift ) |
| 892 | + __field( __u8, flags ) |
| 893 | + ), |
| 894 | + |
| 895 | + TP_fast_assign( |
| 896 | + __entry->vcpu_id = vcpu_id; |
| 897 | + __entry->version = pvclock->version; |
| 898 | + __entry->tsc_timestamp = pvclock->tsc_timestamp; |
| 899 | + __entry->system_time = pvclock->system_time; |
| 900 | + __entry->tsc_to_system_mul = pvclock->tsc_to_system_mul; |
| 901 | + __entry->tsc_shift = pvclock->tsc_shift; |
| 902 | + __entry->flags = pvclock->flags; |
| 903 | + ), |
| 904 | + |
| 905 | + TP_printk("vcpu_id %u, pvclock { version %u, tsc_timestamp 0x%llx, " |
| 906 | + "system_time 0x%llx, tsc_to_system_mul 0x%x, tsc_shift %d, " |
| 907 | + "flags 0x%x }", |
| 908 | + __entry->vcpu_id, |
| 909 | + __entry->version, |
| 910 | + __entry->tsc_timestamp, |
| 911 | + __entry->system_time, |
| 912 | + __entry->tsc_to_system_mul, |
| 913 | + __entry->tsc_shift, |
| 914 | + __entry->flags) |
| 915 | +); |
| 916 | + |
880 | 917 | #endif /* _TRACE_KVM_H */
|
881 | 918 |
|
882 | 919 | #undef TRACE_INCLUDE_PATH
|
|
0 commit comments