diff options
author | Andres Lagar-Cavilla <andreslc@google.com> | 2014-09-23 12:34:54 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-24 14:07:57 +0200 |
commit | 8a9522d2fe6a1b643d3aef5ab7f097f73c601e7a (patch) | |
tree | 1502f42e723797befbb4b8f8418fde14d01f385b /include/trace | |
parent | c1118b3602c2329671ad5ec8bdf8e374323d6343 (diff) | |
download | op-kernel-dev-8a9522d2fe6a1b643d3aef5ab7f097f73c601e7a.zip op-kernel-dev-8a9522d2fe6a1b643d3aef5ab7f097f73c601e7a.tar.gz |
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 ab679c3..6edf1f2 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h @@ -225,24 +225,26 @@ TRACE_EVENT(kvm_fpu, ); TRACE_EVENT(kvm_age_page, - TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), - TP_ARGS(hva, slot, ref), + TP_PROTO(ulong gfn, int level, struct kvm_memory_slot *slot, int ref), + TP_ARGS(gfn, level, slot, ref), TP_STRUCT__entry( __field( u64, hva ) __field( u64, gfn ) + __field( u8, level ) __field( u8, referenced ) ), TP_fast_assign( - __entry->hva = hva; - __entry->gfn = - slot->base_gfn + ((hva - slot->userspace_addr) >> PAGE_SHIFT); + __entry->gfn = gfn; + __entry->level = level; + __entry->hva = ((gfn - slot->base_gfn) << + PAGE_SHIFT) + slot->userspace_addr; __entry->referenced = ref; ), - TP_printk("hva %llx gfn %llx %s", - __entry->hva, __entry->gfn, + TP_printk("hva %llx gfn %llx level %u %s", + __entry->hva, __entry->gfn, __entry->level, __entry->referenced ? "YOUNG" : "OLD") ); |