Santos, Jose Renato G
2009-Dec-14 19:18 UTC
[Xen-devel] [PATCH] Fix xenoprof support for active domains
Xenoprof support for active domains is broken on current Xen. 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 This patch fix this problem. Renato ==================Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com> diff -r 1e9441f4dcbd xen/common/xenoprof.c --- a/xen/common/xenoprof.c Mon Dec 14 11:58:45 2009 +0000 +++ b/xen/common/xenoprof.c Mon Dec 14 10:45:00 2009 -0800 @@ -693,7 +693,8 @@ int do_xenoprof_op(int op, XEN_GUEST_HAN { case XENOPROF_init: ret = xenoprof_op_init(arg); - if ( !ret ) + if ( (ret == 0) && + (current->domain == xenoprof_primary_profiler) ) xenoprof_state = XENOPROF_INITIALIZED; break; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel