diff options
author | Andres Lagar-Cavilla <andreslc@google.com> | 2014-09-23 15:34:54 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-24 08:07:57 -0400 |
commit | 8a9522d2fe6a1b643d3aef5ab7f097f73c601e7a (patch) | |
tree | 1502f42e723797befbb4b8f8418fde14d01f385b /include/trace | |
parent | c1118b3602c2329671ad5ec8bdf8e374323d6343 (diff) |
kvm/x86/mmu: Pass gfn and level to rmapp callback.
Callbacks don't have to do extra computation to learn what the caller
(lvm_handle_hva_range()) knows very well. Useful for
debugging/tracing/printk/future.
Signed-off-by: Andres Lagar-Cavilla <andreslc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/kvm.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index ab679c395042..6edf1f2028cd 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
@@ -225,24 +225,26 @@ TRACE_EVENT(kvm_fpu, | |||
225 | ); | 225 | ); |
226 | 226 | ||
227 | TRACE_EVENT(kvm_age_page, | 227 | TRACE_EVENT(kvm_age_page, |
228 | TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), | 228 | TP_PROTO(ulong gfn, int level, struct kvm_memory_slot *slot, int ref), |
229 | TP_ARGS(hva, slot, ref), | 229 | TP_ARGS(gfn, level, slot, ref), |
230 | 230 | ||
231 | TP_STRUCT__entry( | 231 | TP_STRUCT__entry( |
232 | __field( u64, hva ) | 232 | __field( u64, hva ) |
233 | __field( u64, gfn ) | 233 | __field( u64, gfn ) |
234 | __field( u8, level ) | ||
234 | __field( u8, referenced ) | 235 | __field( u8, referenced ) |
235 | ), | 236 | ), |
236 | 237 | ||
237 | TP_fast_assign( | 238 | TP_fast_assign( |
238 | __entry->hva = hva; | 239 | __entry->gfn = gfn; |
239 | __entry->gfn = | 240 | __entry->level = level; |
240 | slot->base_gfn + ((hva - slot->userspace_addr) >> PAGE_SHIFT); | 241 | __entry->hva = ((gfn - slot->base_gfn) << |
242 | PAGE_SHIFT) + slot->userspace_addr; | ||
241 | __entry->referenced = ref; | 243 | __entry->referenced = ref; |
242 | ), | 244 | ), |
243 | 245 | ||
244 | TP_printk("hva %llx gfn %llx %s", | 246 | TP_printk("hva %llx gfn %llx level %u %s", |
245 | __entry->hva, __entry->gfn, | 247 | __entry->hva, __entry->gfn, __entry->level, |
246 | __entry->referenced ? "YOUNG" : "OLD") | 248 | __entry->referenced ? "YOUNG" : "OLD") |
247 | ); | 249 | ); |
248 | 250 | ||