# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID ce9816c14040d1dadf16a315a782e6e17e760c45
# Parent 3f28ffed6ffff97c4f314c8bf91cf77dc85f396d
[IA64] add perfcounter to mm.c
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
xen/arch/ia64/xen/mm.c | 13 +++++++++++++
xen/include/asm-ia64/perfc_defn.h | 14 ++++++++++++++
2 files changed, 27 insertions(+)
diff -r 3f28ffed6fff -r ce9816c14040 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c Mon Oct 02 21:34:47 2006 -0600
+++ b/xen/arch/ia64/xen/mm.c Mon Oct 02 21:37:39 2006 -0600
@@ -1057,6 +1057,7 @@ assign_domain_page_replace(struct domain
put_page(old_page);
}
}
+ perfc_incrc(assign_domain_page_replace);
}
// caller must get_page(new_page) before
@@ -1117,6 +1118,7 @@ assign_domain_page_cmpxchg_rel(struct do
domain_page_flush(d, mpaddr, old_mfn, new_mfn);
put_page(old_page);
+ perfc_incrc(assign_domain_pge_cmpxchg_rel);
return 0;
}
@@ -1189,6 +1191,7 @@ zap_domain_page_one(struct domain *d, un
try_to_clear_PGC_allocate(d, page);
}
put_page(page);
+ perfc_incrc(zap_dcomain_page_one);
}
unsigned long
@@ -1201,6 +1204,7 @@ dom0vp_zap_physmap(struct domain *d, uns
}
zap_domain_page_one(d, gpfn << PAGE_SHIFT, INVALID_MFN);
+ perfc_incrc(dom0vp_zap_physmap);
return 0;
}
@@ -1246,6 +1250,7 @@ dom0vp_add_physmap(struct domain* d, uns
get_gpfn_from_mfn(mfn) != INVALID_M2P_ENTRY);
assign_domain_page_replace(d, gpfn << PAGE_SHIFT, mfn, flags);
//don't update p2m table because this page belongs to rd, not d.
+ perfc_incrc(dom0vp_add_physmap);
out1:
put_domain(rd);
return error;
@@ -1277,6 +1282,7 @@ create_grant_host_mapping(unsigned long
get_gpfn_from_mfn(mfn) != INVALID_M2P_ENTRY);
assign_domain_page_replace(d, gpaddr, mfn, (flags & GNTMAP_readonly)?
ASSIGN_readonly:
ASSIGN_writable);
+ perfc_incrc(create_grant_host_mapping);
return GNTST_okay;
}
@@ -1336,6 +1342,7 @@ destroy_grant_host_mapping(unsigned long
BUG_ON(page_get_owner(page) == d);//try_to_clear_PGC_allocate(d, page) is
not needed.
put_page(page);
+ perfc_incrc(destroy_grant_host_mapping);
return GNTST_okay;
}
@@ -1396,6 +1403,7 @@ steal_page(struct domain *d, struct page
free_domheap_page(new);
return -1;
}
+ perfc_incrc(steal_page_refcount);
}
spin_lock(&d->page_alloc_lock);
@@ -1465,6 +1473,7 @@ steal_page(struct domain *d, struct page
list_del(&page->list);
spin_unlock(&d->page_alloc_lock);
+ perfc_incrc(steal_page);
return 0;
}
@@ -1482,6 +1491,8 @@ guest_physmap_add_page(struct domain *d,
assign_domain_page_replace(d, gpfn << PAGE_SHIFT, mfn, ASSIGN_writable);
//BUG_ON(mfn != ((lookup_domain_mpa(d, gpfn << PAGE_SHIFT) & _PFN_MASK) >>
PAGE_SHIFT));
+
+ perfc_incrc(guest_physmap_add_page);
}
void
@@ -1490,6 +1501,7 @@ guest_physmap_remove_page(struct domain
{
BUG_ON(mfn == 0);//XXX
zap_domain_page_one(d, gpfn << PAGE_SHIFT, mfn);
+ perfc_incrc(guest_physmap_remove_page);
}
//XXX sledgehammer.
@@ -1502,6 +1514,7 @@ domain_page_flush(struct domain* d, unsi
shadow_mark_page_dirty(d, mpaddr >> PAGE_SHIFT);
domain_flush_vtlb_all();
+ perfc_incrc(domain_page_flush);
}
int
diff -r 3f28ffed6fff -r ce9816c14040 xen/include/asm-ia64/perfc_defn.h
--- a/xen/include/asm-ia64/perfc_defn.h Mon Oct 02 21:34:47 2006 -0600
+++ b/xen/include/asm-ia64/perfc_defn.h Mon Oct 02 21:37:39 2006 -0600
@@ -116,3 +116,17 @@ PERFCOUNTER_CPU(domain_flush_vtlb_range,
// domain.c
PERFCOUNTER_CPU(flush_vtlb_for_context_switch,
"flush_vtlb_for_context_switch")
+
+// mm.c
+PERFCOUNTER_CPU(assign_domain_page_replace, "assign_domain_page_replace")
+PERFCOUNTER_CPU(assign_domain_pge_cmpxchg_rel,
"assign_domain_pge_cmpxchg_rel")
+PERFCOUNTER_CPU(zap_dcomain_page_one, "zap_dcomain_page_one")
+PERFCOUNTER_CPU(dom0vp_zap_physmap, "dom0vp_zap_physmap")
+PERFCOUNTER_CPU(dom0vp_add_physmap, "dom0vp_add_physmap")
+PERFCOUNTER_CPU(create_grant_host_mapping, "create_grant_host_mapping")
+PERFCOUNTER_CPU(destroy_grant_host_mapping, "destroy_grant_host_mapping")
+PERFCOUNTER_CPU(steal_page_refcount, "steal_page_refcount")
+PERFCOUNTER_CPU(steal_page, "steal_page")
+PERFCOUNTER_CPU(guest_physmap_add_page, "guest_physmap_add_page")
+PERFCOUNTER_CPU(guest_physmap_remove_page, "guest_physmap_remove_page")
+PERFCOUNTER_CPU(domain_page_flush, "domain_page_flush")
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|