diff options
author | Avi Kivity <avi@redhat.com> | 2009-12-31 05:10:16 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:36:09 -0500 |
commit | 90bb6fc556ab255abd798bcf4ff5769690ab2eea (patch) | |
tree | dd17338dbcb5a2963800639bcf097595861810d2 /include/trace/events/kvm.h | |
parent | 43db669730743fcc2a74b641ff4d77781eb15bfa (diff) |
KVM: MMU: Add tracepoint for guest page aging
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/trace/events/kvm.h')
-rw-r--r-- | include/trace/events/kvm.h | 22 |
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, | |||
164 | TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)) | 164 | TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)) |
165 | ); | 165 | ); |
166 | 166 | ||
167 | TRACE_EVENT(kvm_age_page, | ||
168 | TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), | ||
169 | TP_ARGS(hva, slot, ref), | ||
170 | |||
171 | TP_STRUCT__entry( | ||
172 | __field( u64, hva ) | ||
173 | __field( u64, gfn ) | ||
174 | __field( u8, referenced ) | ||
175 | ), | ||
176 | |||
177 | TP_fast_assign( | ||
178 | __entry->hva = hva; | ||
179 | __entry->gfn = | ||
180 | slot->base_gfn + ((hva - slot->userspace_addr) >> PAGE_SHIFT); | ||
181 | __entry->referenced = ref; | ||
182 | ), | ||
183 | |||
184 | TP_printk("hva %llx gfn %llx %s", | ||
185 | __entry->hva, __entry->gfn, | ||
186 | __entry->referenced ? "YOUNG" : "OLD") | ||
187 | ); | ||
188 | |||
167 | #endif /* _TRACE_KVM_MAIN_H */ | 189 | #endif /* _TRACE_KVM_MAIN_H */ |
168 | 190 | ||
169 | /* This part must be outside protection */ | 191 | /* This part must be outside protection */ |