From: Keir Fraser Date: Wed, 16 Dec 2009 12:20:08 +0000 (+0000) Subject: xenoprof: Fix support for active domains X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12896 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3cc29c0f268789f120cd5bb5c15b3977bed2c414;p=xen.git 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 --- 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;