Lines Matching +full:sample +full:- +full:time
1 // SPDX-License-Identifier: GPL-2.0
4 #include "../../../util/kvm-stat.h"
17 .name = "VM-EXIT"
27 * the time of MMIO write: kvm_mmio(KVM_TRACE_MMIO_WRITE...) -> kvm_entry
28 * the time of MMIO read: kvm_exit -> kvm_mmio(KVM_TRACE_MMIO_READ...).
30 static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument
33 key->key = evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
34 key->info = evsel__intval(evsel, sample, "type"); in mmio_event_get_key()
42 struct perf_sample *sample, struct event_key *key) in mmio_event_begin() argument
50 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_WRITE) { in mmio_event_begin()
51 mmio_event_get_key(evsel, sample, key); in mmio_event_begin()
58 static bool mmio_event_end(struct evsel *evsel, struct perf_sample *sample, in mmio_event_end() argument
67 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_READ) { in mmio_event_end()
68 mmio_event_get_key(evsel, sample, key); in mmio_event_end()
80 (unsigned long)key->key, in mmio_event_decode_key()
81 key->info == KVM_TRACE_MMIO_WRITE ? "W" : "R"); in mmio_event_decode_key()
91 /* The time of emulation pio access is from kvm_pio to kvm_entry. */
93 struct perf_sample *sample, in ioport_event_get_key() argument
96 key->key = evsel__intval(evsel, sample, "port"); in ioport_event_get_key()
97 key->info = evsel__intval(evsel, sample, "rw"); in ioport_event_get_key()
101 struct perf_sample *sample, in ioport_event_begin() argument
105 ioport_event_get_key(evsel, sample, key); in ioport_event_begin()
113 struct perf_sample *sample __maybe_unused, in ioport_event_end()
124 (unsigned long long)key->key, in ioport_event_decode_key()
125 key->info ? "POUT" : "PIN"); in ioport_event_decode_key()
135 /* The time of emulation msr is from kvm_msr to kvm_entry. */
137 struct perf_sample *sample, in msr_event_get_key() argument
140 key->key = evsel__intval(evsel, sample, "ecx"); in msr_event_get_key()
141 key->info = evsel__intval(evsel, sample, "write"); in msr_event_get_key()
145 struct perf_sample *sample, in msr_event_begin() argument
149 msr_event_get_key(evsel, sample, key); in msr_event_begin()
157 struct perf_sample *sample __maybe_unused, in msr_event_end()
168 (unsigned long long)key->key, in msr_event_decode_key()
169 key->info ? "W" : "R"); in msr_event_decode_key()
204 kvm->exit_reasons = vmx_exit_reasons; in cpu_isa_init()
205 kvm->exit_reasons_isa = "VMX"; in cpu_isa_init()
207 kvm->exit_reasons = svm_exit_reasons; in cpu_isa_init()
208 kvm->exit_reasons_isa = "SVM"; in cpu_isa_init()
210 return -ENOTSUP; in cpu_isa_init()