WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix xenoprof support for active domains
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix xenoprof support for active domains, Santos, Jose Renato G <=