debuggers.hg

changeset 20692:d7403d17d03a

xenoprof: Fix support for active domains

If a user tries to use opcontrol with option --active-domains in dom0
and then run opcontrol in a guest, no samples are generated. When the
guest calls the xenoprof interface it resets the internal Xenoprof
state machine and profiling does not start

Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 16 12:20:08 2009 +0000 (2009-12-16)
parents 1e9441f4dcbd
children f9998fedea78
files xen/common/xenoprof.c
line diff
     1.1 --- a/xen/common/xenoprof.c	Mon Dec 14 11:58:45 2009 +0000
     1.2 +++ b/xen/common/xenoprof.c	Wed Dec 16 12:20:08 2009 +0000
     1.3 @@ -693,7 +693,8 @@ int do_xenoprof_op(int op, XEN_GUEST_HAN
     1.4      {
     1.5      case XENOPROF_init:
     1.6          ret = xenoprof_op_init(arg);
     1.7 -        if ( !ret )
     1.8 +        if ( (ret == 0) &&
     1.9 +             (current->domain == xenoprof_primary_profiler) )
    1.10              xenoprof_state = XENOPROF_INITIALIZED;
    1.11          break;
    1.12