[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fix xenoprof support for active domains


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Santos, Jose Renato G" <joserenato.santos@xxxxxx>
  • Date: Mon, 14 Dec 2009 19:18:48 +0000
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 14 Dec 2009 11:19:15 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acp88kM66E8xgkR0RQqAyeq1HMYWsQ==
  • Thread-topic: [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
Description: fix_xenoprof_active.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.