ia64/xen-unstable

changeset 1607:5a618f8591d4

bitkeeper revision 1.1011.3.1 (40e0586fjTiPMS5QT6pzPb5uZe0MMw)

Various xentrace tweaks. Should perform better now. May still need more work.
Let me know if you have problems with it.
author mwilli2@equilibrium.research.intel-research.net
date Mon Jun 28 17:42:07 2004 +0000 (2004-06-28)
parents 463ef0310fbe
children 56f9ac36e892
files tools/xentrace/formats tools/xentrace/xentrace.c xen/common/kernel.c xen/common/schedule.c xen/include/xen/trace.h
line diff
     1.1 --- a/tools/xentrace/formats	Thu Jun 24 19:06:06 2004 +0000
     1.2 +++ b/tools/xentrace/formats	Mon Jun 28 17:42:07 2004 +0000
     1.3 @@ -1,17 +1,17 @@
     1.4 -#0x00010000	CPU%(cpu)d %(tsc).6f sched_add_domain(0x%(3)08x)            [ dom id = 0x%(1)x%(2)08x   ]
     1.5 -#0x00010001	CPU%(cpu)d %(tsc).6f sched_rem_domain(0x%08(3)x)            [ dom id = 0x%(1)x%(2)08x   ]
     1.6 -#0x00010002	CPU%(cpu)d %(tsc).6f __wake_up(0x%(3)08x)                   [ dom id = 0x%(1)x%(2)08x   ]
     1.7 -#0x00010003	CPU%(cpu)d %(tsc).6f do_block()                             [ current = 0x%(2)08x         ]
     1.8 -#0x00010004	CPU%(cpu)d %(tsc).6f do_yield()		                    [ current = %(2)08x         ]
     1.9 -#0x00010005	CPU%(cpu)d %(tsc).6f do_set_timer_op(0x%(4)08x, 0x%(5)08x)  [ current = 0x%(3)08x ]
    1.10 -#0x00010006	CPU%(cpu)d %(tsc).6f sched_ctl(0x%(1)08x)
    1.11 -#0x00010007	CPU%(cpu)d %(tsc).6f sched_adjdom(params)                   [ dom id = 0x%(1)x%(2)08x   ]
    1.12 -#0x00010008	CPU%(cpu)d %(tsc).6f __reschedule(0x%(3)08x)                [ dom id = 0x%(1)x%(2)08x   ]
    1.13 -#0x00010009	CPU%(cpu)d %(tsc).6f switching to task_struct 0x%(1)08x     [ dom id = 0x%(1)x     ]
    1.14 -#0x0001000A	CPU%(cpu)d %(tsc).6f s_timer_fn(unused)
    1.15 -#0x0001000B	CPU%(cpu)d %(tsc).6f t_timer_fn(unused)
    1.16 -#0x0001000C	CPU%(cpu)d %(tsc).6f dom_timer_fn(data)
    1.17 -#0x0001000D	CPU%(cpu)d %(tsc).6f fallback_timer_fn(unused)
    1.18 +0x00010000	CPU%(cpu)d %(tsc).6f sched_add_domain(0x%(3)08x)            [ dom id = 0x%(2)08x   ]
    1.19 +0x00010001	CPU%(cpu)d %(tsc).6f sched_rem_domain(0x%08(3)x)            [ dom id = 0x%(2)08x   ]
    1.20 +0x00010002	CPU%(cpu)d %(tsc).6f __wake_up(0x%(3)08x)                   [ dom id = 0x%(2)08x   ]
    1.21 +0x00010003	CPU%(cpu)d %(tsc).6f do_block()                             [ current = 0x%(2)08x  ]
    1.22 +0x00010004	CPU%(cpu)d %(tsc).6f do_yield()		                    [ current = %(2)08x    ]
    1.23 +0x00010005	CPU%(cpu)d %(tsc).6f do_set_timer_op(0x%(4)08x, 0x%(5)08x)  [ current = 0x%(3)08x  ]
    1.24 +0x00010006	CPU%(cpu)d %(tsc).6f sched_ctl(0x%(1)08x)
    1.25 +0x00010007	CPU%(cpu)d %(tsc).6f sched_adjdom(params)                   [ dom id = 0x%(2)08x   ]
    1.26 +0x00010008	CPU%(cpu)d %(tsc).6f __reschedule(0x%(3)08x)                [ dom id = 0x(2)08x    ]
    1.27 +0x00010009	CPU%(cpu)d %(tsc).6f switching to task_struct 0x%(1)08x     [ dom id = 0x%(1)x     ]
    1.28 +0x0001000A	CPU%(cpu)d %(tsc).6f s_timer_fn(unused)
    1.29 +0x0001000B	CPU%(cpu)d %(tsc).6f t_timer_fn(unused)
    1.30 +0x0001000C	CPU%(cpu)d %(tsc).6f dom_timer_fn(data)
    1.31 +0x0001000D	CPU%(cpu)d %(tsc).6f fallback_timer_fn(unused)
    1.32  
    1.33  
    1.34  0x00020008	CPU%(cpu)d %(tsc).6f enter: dom0_create_dom ( )
     2.1 --- a/tools/xentrace/xentrace.c	Thu Jun 24 19:06:06 2004 +0000
     2.2 +++ b/tools/xentrace/xentrace.c	Mon Jun 28 17:42:07 2004 +0000
     2.3 @@ -311,7 +311,7 @@ int monitor_tbufs(FILE *logfile)
     2.4  /*	    printf("XX%d: cons=%ld head=%ld  %p\n", i,
     2.5  		   cons[i], meta[i]->head, data[i] + (cons[i] % size_in_recs) );
     2.6  		   */
     2.7 -	    while( cons[i] < meta[i]->head )
     2.8 +	    while( cons[i] != meta[i]->head )
     2.9  	    {
    2.10  /*
    2.11  		if( (cons[i] % 6  ) == 0 )
     3.1 --- a/xen/common/kernel.c	Thu Jun 24 19:06:06 2004 +0000
     3.2 +++ b/xen/common/kernel.c	Mon Jun 28 17:42:07 2004 +0000
     3.3 @@ -59,7 +59,7 @@ int opt_watchdog=0;
     3.4  /* opt_pdb: Name of serial port for Xen pervasive debugger (and enable pdb) */
     3.5  unsigned char opt_pdb[10] = "none";
     3.6  /* opt_tbuf_size: trace buffer size (in pages) */
     3.7 -unsigned int opt_tbuf_size = 1;
     3.8 +unsigned int opt_tbuf_size = 10;
     3.9  /* opt_sched: scheduler - default to Borrowed Virtual Time */
    3.10  char opt_sched[10] = "bvt";
    3.11  /* opt_physdev_dom0_hide: list of PCI slots to hide from domain 0. */
     4.1 --- a/xen/common/schedule.c	Thu Jun 24 19:06:06 2004 +0000
     4.2 +++ b/xen/common/schedule.c	Mon Jun 28 17:42:07 2004 +0000
     4.3 @@ -58,9 +58,6 @@
     4.4  #define TRC_SCHED_DOM_TIMER_FN        0x0001000C
     4.5  #define TRC_SCHED_FALLBACK_TIMER_FN   0x0001000D
     4.6  
     4.7 -#define _HIGH32(_x) (_x >> 32)
     4.8 -#define _LOW32(_x)  ((u32)_x )
     4.9 -
    4.10  /* Various timer handlers. */
    4.11  static void s_timer_fn(unsigned long unused);
    4.12  static void t_timer_fn(unsigned long unused);
    4.13 @@ -147,14 +144,14 @@ void sched_add_domain(struct domain *d)
    4.14  
    4.15      SCHED_OP(add_task, d);
    4.16  
    4.17 -    TRACE_3D(TRC_SCHED_DOM_ADD, _HIGH32(d->domain), _LOW32(d->domain), d);
    4.18 +    TRACE_2D(TRC_SCHED_DOM_ADD, d->domain, d);
    4.19  }
    4.20  
    4.21  void sched_rem_domain(struct domain *d) 
    4.22  {
    4.23      rem_ac_timer(&d->timer);
    4.24      SCHED_OP(rem_task, d);
    4.25 -    TRACE_3D(TRC_SCHED_DOM_REM, _HIGH32(d->domain), _LOW32(d->domain), d);
    4.26 +    TRACE_2D(TRC_SCHED_DOM_REM, d->domain, d);
    4.27  }
    4.28  
    4.29  void init_idle_task(void)
    4.30 @@ -207,7 +204,7 @@ void domain_wake(struct domain *d)
    4.31  
    4.32      if ( likely(domain_runnable(d)) && likely(!__task_on_runqueue(d)) )
    4.33      {
    4.34 -        TRACE_3D(TRC_SCHED_WAKE, _HIGH32(d->domain), _LOW32(d->domain), d);
    4.35 +        TRACE_2D(TRC_SCHED_WAKE,d->domain, d);
    4.36          SCHED_OP(wake_up, d);
    4.37  #ifdef WAKE_HISTO
    4.38          p->wokenup = NOW();
    4.39 @@ -296,8 +293,7 @@ long do_set_timer_op(unsigned long timeo
    4.40          add_ac_timer(&p->timer);
    4.41      }
    4.42  
    4.43 -    TRACE_5D(TRC_SCHED_SET_TIMER, _HIGH32(p->domain), _LOW32(p->domain),
    4.44 -             p, timeout_hi, timeout_lo);
    4.45 +    TRACE_4D(TRC_SCHED_SET_TIMER, p->domain, p, timeout_hi, timeout_lo);
    4.46  
    4.47      return 0;
    4.48  }
    4.49 @@ -335,7 +331,7 @@ long sched_adjdom(struct sched_adjdom_cm
    4.50      if( p == NULL )
    4.51          return -ESRCH;
    4.52  
    4.53 -    TRACE_2D(TRC_SCHED_ADJDOM, _HIGH32(p->domain), _LOW32(p->domain));
    4.54 +    TRACE_1D(TRC_SCHED_ADJDOM, p->domain);
    4.55  
    4.56      SCHED_OP(adjdom, p, cmd);
    4.57  
     5.1 --- a/xen/include/xen/trace.h	Thu Jun 24 19:06:06 2004 +0000
     5.2 +++ b/xen/include/xen/trace.h	Mon Jun 28 17:42:07 2004 +0000
     5.3 @@ -80,7 +80,7 @@ static inline int trace(u32 event, u32 d
     5.4  
     5.5      buf->head_ptr++;
     5.6      buf->head++;
     5.7 -    if ( buf->head_ptr == (buf->vdata + (buf->size-1)) )
     5.8 +    if ( buf->head_ptr == (buf->vdata + buf->size) )
     5.9          buf->head_ptr = buf->vdata;
    5.10  
    5.11      local_irq_restore(flags);