summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-31 13:10:16 +0300
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 18:36:09 +0300
commit90bb6fc556ab255abd798bcf4ff5769690ab2eea (patch)
treedd17338dbcb5a2963800639bcf097595861810d2 /include/trace
parent43db669730743fcc2a74b641ff4d77781eb15bfa (diff)
downloadlinux-90bb6fc556ab255abd798bcf4ff5769690ab2eea.tar.xz
KVM: MMU: Add tracepoint for guest page aging
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/kvm.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 8abdc1230143..b17d49dfc3ef 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -164,6 +164,28 @@ TRACE_EVENT(kvm_fpu,
TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol))
);
+TRACE_EVENT(kvm_age_page,
+ TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref),
+ TP_ARGS(hva, slot, ref),
+
+ TP_STRUCT__entry(
+ __field( u64, hva )
+ __field( u64, gfn )
+ __field( u8, referenced )
+ ),
+
+ TP_fast_assign(
+ __entry->hva = hva;
+ __entry->gfn =
+ slot->base_gfn + ((hva - slot->userspace_addr) >> PAGE_SHIFT);
+ __entry->referenced = ref;
+ ),
+
+ TP_printk("hva %llx gfn %llx %s",
+ __entry->hva, __entry->gfn,
+ __entry->referenced ? "YOUNG" : "OLD")
+);
+
#endif /* _TRACE_KVM_MAIN_H */
/* This part must be outside protection */