mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
KVM: kvmtrace: replace get_cycles with ktime_get v3
The current kvmtrace code uses get_cycles() while the interpretation would be easier using using nanoseconds. ktime_get() should give at least the same accuracy as get_cycles on all architectures (even better on 32bit archs) but at a better unit (e.g. comparable between hosts with different frequencies. [avi: avoid ktime_t in public header] Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
e32c8f2c07
commit
3f7f95c65e
2 changed files with 13 additions and 12 deletions
|
@ -322,12 +322,12 @@ struct kvm_trace_rec {
|
|||
__u32 vcpu_id;
|
||||
union {
|
||||
struct {
|
||||
__u64 cycle_u64;
|
||||
__u64 timestamp;
|
||||
__u32 extra_u32[KVM_TRC_EXTRA_MAX];
|
||||
} __attribute__((packed)) cycle;
|
||||
} __attribute__((packed)) timestamp;
|
||||
struct {
|
||||
__u32 extra_u32[KVM_TRC_EXTRA_MAX];
|
||||
} nocycle;
|
||||
} notimestamp;
|
||||
} u;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue