aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/memory.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-02-03 09:35:23 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-02-03 09:35:23 +0000
commiteddd8e39554e06e792d5fe5bb5dbeed8dbeceaf6 (patch)
treeefc50c787da85fc095579bd5ebc3d72809ec420a /xen/common/memory.c
parent2ca873ab32a1424cc425fc9ee0b3285f22cc8ee0 (diff)
downloadxen-eddd8e39554e06e792d5fe5bb5dbeed8dbeceaf6.tar.gz
xen-eddd8e39554e06e792d5fe5bb5dbeed8dbeceaf6.tar.bz2
xen-eddd8e39554e06e792d5fe5bb5dbeed8dbeceaf6.zip
xentrace: Trace p2m events
Add more tracing to aid in debugging ballooning / PoD: * Nested page faults for EPT/NPT systems * set_p2m_enry * Decrease reservation (for ballooning) * PoD populate, zero reclaim, superpage splinter Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Diffstat (limited to 'xen/common/memory.c')
-rw-r--r--xen/common/memory.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/common/memory.c b/xen/common/memory.c
index 329483756a..b1db5f5888 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -28,6 +28,7 @@
#include <xen/numa.h>
#include <public/memory.h>
#include <xsm/xsm.h>
+#include <xen/trace.h>
struct memop_args {
/* INPUT */
@@ -222,6 +223,20 @@ static void decrease_reservation(struct memop_args *a)
if ( unlikely(__copy_from_guest_offset(&gmfn, a->extent_list, i, 1)) )
goto out;
+ if ( tb_init_done )
+ {
+ struct {
+ u64 gfn;
+ int d:16,order:16;
+ } t;
+
+ t.gfn = gmfn;
+ t.d = a->domain->domain_id;
+ t.order = a->extent_order;
+
+ __trace_var(TRC_MEM_DECREASE_RESERVATION, 0, sizeof(t), (unsigned char *)&t);
+ }
+
/* See if populate-on-demand wants to handle this */
if ( is_hvm_domain(a->domain)
&& p2m_pod_decrease_reservation(a->domain, gmfn, a->extent_order) )