ia64/xen-unstable

changeset 7582:2947b0df5ffa

Simplify trace header some more, and ensure that
construction of arguments for tracing is outlined from
straightline code paths.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 30 23:28:32 2005 +0100 (2005-10-30)
parents d8a39152f982
children 7d0d88685f79
files xen/common/trace.c xen/include/xen/trace.h
line diff
     1.1 --- a/xen/common/trace.c	Sun Oct 30 23:17:58 2005 +0100
     1.2 +++ b/xen/common/trace.c	Sun Oct 30 23:28:32 2005 +0100
     1.3 @@ -40,7 +40,7 @@ static struct t_buf *t_bufs[NR_CPUS];
     1.4  
     1.5  /* a flag recording whether initialization has been done */
     1.6  /* or more properly, if the tbuf subsystem is enabled right now */
     1.7 -int tb_init_done = 0;
     1.8 +int tb_init_done;
     1.9  
    1.10  /* which CPUs tracing is enabled on */
    1.11  static unsigned long tb_cpu_mask = (~0UL);
     2.1 --- a/xen/include/xen/trace.h	Sun Oct 30 23:17:58 2005 +0100
     2.2 +++ b/xen/include/xen/trace.h	Sun Oct 30 23:28:32 2005 +0100
     2.3 @@ -23,12 +23,8 @@
     2.4  #ifndef __XEN_TRACE_H__
     2.5  #define __XEN_TRACE_H__
     2.6  
     2.7 -#include <asm/page.h>
     2.8 -#include <xen/types.h>
     2.9 -#include <xen/sched.h>
    2.10 +#include <xen/config.h>
    2.11  #include <asm/atomic.h>
    2.12 -#include <asm/current.h>
    2.13 -#include <asm/msr.h>
    2.14  #include <public/dom0_ops.h>
    2.15  #include <public/trace.h>
    2.16  
    2.17 @@ -46,7 +42,7 @@ void trace(u32 event, unsigned long d1, 
    2.18  /* Avoids troubling the caller with casting their arguments to a trace macro */
    2.19  #define trace_do_casts(e,d1,d2,d3,d4,d5) \
    2.20      do {                                 \
    2.21 -        if ( tb_init_done )              \
    2.22 +        if ( unlikely(tb_init_done) )    \
    2.23              trace(e,                     \
    2.24                   (unsigned long)d1,      \
    2.25                   (unsigned long)d2,      \