WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 07/15] xen/trace: add xen_pgd_(un)pin tracepoints

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 07/15] xen/trace: add xen_pgd_(un)pin tracepoints
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
Date: Mon, 20 Jun 2011 20:28:18 -0400
Cc: Xen Devel <Xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Linux
Delivery-date: Mon, 20 Jun 2011 17:28:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <cdfa49a00e83b62d4fbd0cab251c9c1571a3ce6f.1308607697.git.jeremy.fitzhardinge@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <cover.1308607697.git.jeremy.fitzhardinge@xxxxxxxxxx> <cdfa49a00e83b62d4fbd0cab251c9c1571a3ce6f.1308607697.git.jeremy.fitzhardinge@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2011-06-20 at 15:15 -0700, Jeremy Fitzhardinge wrote:
> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> ---
>  arch/x86/xen/mmu.c         |    4 ++++
>  include/trace/events/xen.h |   24 ++++++++++++++++++++++++
>  2 files changed, 28 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 84c796f..8aaa398 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -884,6 +884,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)) {
> @@ -1009,6 +1011,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 16edcb7..5811c24 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 */


Looks like there's lots of candidates for DECLARE_EVENT_CLASS() and
DEFINE_EVENT()s.

-- Steve

>  
>  /* This part must be outside protection */



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>