aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/xenoprof.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-12-16 12:20:08 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-12-16 12:20:08 +0000
commit3cc29c0f268789f120cd5bb5c15b3977bed2c414 (patch)
treeddb7bae97cabadb4f28006a26545860ccc04d5b3 /xen/common/xenoprof.c
parent420820e830a012939240db12c52a5d340a4298f1 (diff)
downloadxen-3cc29c0f268789f120cd5bb5c15b3977bed2c414.tar.gz
xen-3cc29c0f268789f120cd5bb5c15b3977bed2c414.tar.bz2
xen-3cc29c0f268789f120cd5bb5c15b3977bed2c414.zip
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>
Diffstat (limited to 'xen/common/xenoprof.c')
-rw-r--r--xen/common/xenoprof.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c
index ec29e1a1a0..9390d8dc9b 100644
--- a/xen/common/xenoprof.c
+++ b/xen/common/xenoprof.c
@@ -693,7 +693,8 @@ int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg)
{
case XENOPROF_init:
ret = xenoprof_op_init(arg);
- if ( !ret )
+ if ( (ret == 0) &&
+ (current->domain == xenoprof_primary_profiler) )
xenoprof_state = XENOPROF_INITIALIZED;
break;