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

Re: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fields fo

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fields for exported xentrace data.
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Thu, 30 Nov 2006 13:02:21 +0000
Cc: keir.fraser@xxxxxxxxxxxx, Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 30 Nov 2006 09:29:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200611300601.kAU614qa025335@xxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200611300601.kAU614qa025335@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
It's worth noting that this patch will (roughly) halve the number of trace 
records.  Nobody should probably be relying on trace buffer size anymore, so 
this shouldn't be an issue.

No objections here.

Cheers,
Mark

On Thursday 30 November 2006 05:59, Tony Breeds wrote:
> Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
> ---
>
>  xen/common/trace.c         |    6 +++---
>  xen/include/public/trace.h |    2 +-
>  xen/include/xen/trace.h    |   14 +++++++-------
>  3 files changed, 11 insertions(+), 11 deletions(-)
>
> Index: xen-unstable.hg-mainline.xentrace/xen/common/trace.c
> ===================================================================
> --- xen-unstable.hg-mainline.xentrace.orig/xen/common/trace.c
> +++ xen-unstable.hg-mainline.xentrace/xen/common/trace.c
> @@ -46,7 +46,7 @@ static int nr_recs;
>  static int t_buf_highwater;
>
>  /* Number of records lost due to per-CPU trace buffer being full. */
> -static DEFINE_PER_CPU(unsigned long, lost_records);
> +static DEFINE_PER_CPU(uint64_t, lost_records);
>
>  /* a flag recording whether initialization has been done */
>  /* or more properly, if the tbuf subsystem is enabled right now */
> @@ -228,8 +228,8 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc
>   * failure, otherwise 0.  Failure occurs only if the trace buffers are not
> yet * initialised.
>   */
> -void trace(u32 event, unsigned long d1, unsigned long d2,
> -           unsigned long d3, unsigned long d4, unsigned long d5)
> +void trace(uint32_t event, uint64_t d1, uint64_t d2, uint64_t d3, uint64_t
> d4, +                           uint64_t d5)
>  {
>      struct t_buf *buf;
>      struct t_rec *rec;
> Index: xen-unstable.hg-mainline.xentrace/xen/include/public/trace.h
> ===================================================================
> --- xen-unstable.hg-mainline.xentrace.orig/xen/include/public/trace.h
> +++ xen-unstable.hg-mainline.xentrace/xen/include/public/trace.h
> @@ -76,7 +76,7 @@
>  struct t_rec {
>      uint64_t cycles;          /* cycle counter timestamp */
>      uint32_t event;           /* event ID                */
> -    unsigned long data[5];    /* event data items        */
> +    uint64_t data[5];         /* event data items        */
>  };
>
>  /*
> Index: xen-unstable.hg-mainline.xentrace/xen/include/xen/trace.h
> ===================================================================
> --- xen-unstable.hg-mainline.xentrace.orig/xen/include/xen/trace.h
> +++ xen-unstable.hg-mainline.xentrace/xen/include/xen/trace.h
> @@ -33,19 +33,19 @@ void init_trace_bufs(void);
>  /* used to retrieve the physical address of the trace buffers */
>  int tb_control(struct xen_sysctl_tbuf_op *tbc);
>
> -void trace(u32 event, unsigned long d1, unsigned long d2,
> -           unsigned long d3, unsigned long d4, unsigned long d5);
> +void trace(uint32_t event, uint64_t d1, uint64_t d2, uint64_t d3, uint64_t
> d4, +                           uint64_t d5);
>
>  /* Avoids troubling the caller with casting their arguments to a trace
> macro */ #define trace_do_casts(e,d1,d2,d3,d4,d5) \
>      do {                                 \
>          if ( unlikely(tb_init_done) )    \
>              trace(e,                     \
> -                 (unsigned long)d1,      \
> -                 (unsigned long)d2,      \
> -                 (unsigned long)d3,      \
> -                 (unsigned long)d4,      \
> -                 (unsigned long)d5);     \
> +                 (uint64_t)d1,           \
> +                 (uint64_t)d2,           \
> +                 (uint64_t)d3,           \
> +                 (uint64_t)d4,           \
> +                 (uint64_t)d5);          \
>      } while ( 0 )
>
>  /* Convenience macros for calling the trace function. */
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

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