debuggers.hg

changeset 22668:a0228a0f3fd2

credit2: On debug keypress print load average as a fraction

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
author Keir Fraser <keir@xen.org>
date Fri Dec 24 08:32:43 2010 +0000 (2010-12-24)
parents 94d47b8b723f
children a71729704d4b
files xen/common/sched_credit2.c
line diff
     1.1 --- a/xen/common/sched_credit2.c	Fri Dec 24 08:32:20 2010 +0000
     1.2 +++ b/xen/common/sched_credit2.c	Fri Dec 24 08:32:43 2010 +0000
     1.3 @@ -1774,14 +1774,20 @@ csched_dump(const struct scheduler *ops)
     1.4             CSCHED_DEFAULT_WEIGHT);
     1.5      for_each_cpu_mask(i, prv->active_queues)
     1.6      {
     1.7 +        s_time_t fraction;
     1.8 +        
     1.9 +        fraction = prv->rqd[i].avgload * 100 / (1ULL<<prv->load_window_shift);
    1.10 +
    1.11          printk("Runqueue %d:\n"
    1.12                 "\tncpus              = %u\n"
    1.13                 "\tmax_weight         = %d\n"
    1.14 -               "\tload               = %d\n",
    1.15 +               "\tinstload           = %d\n"
    1.16 +               "\taveload            = %3ld\n",
    1.17                 i,
    1.18                 cpus_weight(prv->rqd[i].active),
    1.19                 prv->rqd[i].max_weight,
    1.20 -               prv->rqd[i].load);
    1.21 +               prv->rqd[i].load,
    1.22 +               fraction);
    1.23  
    1.24      }
    1.25      /* FIXME: Locking! */