summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-12-17 15:31:23 -0800
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2011-07-18 15:43:27 -0700
commit5f94fb5b8edf29bba06e2cd05f9d3a80a5dfb9bc (patch)
tree180fb7320f840a51ec64d349bbeeaaba0cae8a7c
parentc2ba050d2e5638774571ea0ad0375a1c17c7b04e (diff)
downloadblackbird-op-linux-5f94fb5b8edf29bba06e2cd05f9d3a80a5dfb9bc.tar.gz
blackbird-op-linux-5f94fb5b8edf29bba06e2cd05f9d3a80a5dfb9bc.zip
xen/trace: add xen_pgd_(un)pin tracepoints
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-rw-r--r--arch/x86/xen/mmu.c4
-rw-r--r--include/trace/events/xen.h24
2 files changed, 28 insertions, 0 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index f2160997287e..5dfa90a7ad18 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -885,6 +885,8 @@ static int xen_pin_page(struct mm_struct *mm, struct page *page,
read-only, and can be pinned. */
static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd)
{
+ trace_xen_mmu_pgd_pin(mm, pgd);
+
xen_mc_batch();
if (__xen_pgd_walk(mm, pgd, xen_pin_page, USER_LIMIT)) {
@@ -1010,6 +1012,8 @@ static int xen_unpin_page(struct mm_struct *mm, struct page *page,
/* Release a pagetables pages back as normal RW */
static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd)
{
+ trace_xen_mmu_pgd_unpin(mm, pgd);
+
xen_mc_batch();
xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd)));
diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h
index f46fdb4afb89..0b6056de2b00 100644
--- a/include/trace/events/xen.h
+++ b/include/trace/events/xen.h
@@ -381,6 +381,30 @@ TRACE_EVENT(xen_mmu_release_ptpage,
__entry->pinned ? "" : "un")
);
+TRACE_EVENT(xen_mmu_pgd_pin,
+ TP_PROTO(struct mm_struct *mm, pgd_t *pgd),
+ TP_ARGS(mm, pgd),
+ TP_STRUCT__entry(
+ __field(struct mm_struct *, mm)
+ __field(pgd_t *, pgd)
+ ),
+ TP_fast_assign(__entry->mm = mm;
+ __entry->pgd = pgd),
+ TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd)
+ );
+
+TRACE_EVENT(xen_mmu_pgd_unpin,
+ TP_PROTO(struct mm_struct *mm, pgd_t *pgd),
+ TP_ARGS(mm, pgd),
+ TP_STRUCT__entry(
+ __field(struct mm_struct *, mm)
+ __field(pgd_t *, pgd)
+ ),
+ TP_fast_assign(__entry->mm = mm;
+ __entry->pgd = pgd),
+ TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd)
+ );
+
#endif /* _TRACE_XEN_H */
/* This part must be outside protection */
OpenPOWER on IntegriCloud