diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-12-16 12:20:08 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-12-16 12:20:08 +0000 |
commit | 3cc29c0f268789f120cd5bb5c15b3977bed2c414 (patch) | |
tree | ddb7bae97cabadb4f28006a26545860ccc04d5b3 /xen/common/xenoprof.c | |
parent | 420820e830a012939240db12c52a5d340a4298f1 (diff) | |
download | xen-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.c | 3 |
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; |