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] RE: [PATCH] Make lock profiling usable again

To: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] Make lock profiling usable again
From: "Hao, Xudong" <xudong.hao@xxxxxxxxx>
Date: Sat, 5 Nov 2011 12:10:49 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Fri, 04 Nov 2011 21:17:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <df918a251d01d3ac6267.1320411162@nehalem1>
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>
References: <df918a251d01d3ac6267.1320411162@nehalem1>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acya8UpR71hKGcpnT56+fP08UusELgAfctSA
Thread-topic: [PATCH] Make lock profiling usable again
Initialize profile to NULL when lock profiling is not enabled.

diff -r 068d3d55ce6e xen/include/xen/spinlock.h
--- a/xen/include/xen/spinlock.h        Tue Nov 01 19:03:38 2011 +0000
+++ b/xen/include/xen/spinlock.h        Sat Nov 05 11:57:38 2011 +0800
@@ -108,7 +108,7 @@ struct lock_profile_qhead { };
 struct lock_profile_qhead { };

 #define SPIN_LOCK_UNLOCKED                                                    \
-    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, { } }
+    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, NULL }
 #define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED

 #define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))


Thanks,
-Xudong


> -----Original Message-----
> From: Juergen Gross [mailto:juergen.gross@xxxxxxxxxxxxxx]
> Sent: Friday, November 04, 2011 8:53 PM
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Cc: Hao, Xudong
> Subject: [PATCH] Make lock profiling usable again
> 
> Using lock profiling (option lock_profile in xen/Rules.mk) resulted in build 
> errors.
> Changes:
> - Include public/sysctl.h in spinlock.h when using lock profiling.
> - Allocate profile data in an own structure to avoid struct domain becoming
>   larger then one page
> 
> Signed-off-by: juergen.gross@xxxxxxxxxxxxxx
> 
> 
> 2 files changed, 44 insertions(+), 24 deletions(-)
> xen/common/spinlock.c      |   34 +++++++++++++++++++++-------------
> xen/include/xen/spinlock.h |   34 +++++++++++++++++++++++-----------
> 


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

<Prev in Thread] Current Thread [Next in Thread>