 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [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@xxxxxxxxxx>
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;
 
Attachment:
fix_xenoprof_active.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |