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

[Xen-changelog] [xen-unstable] eliminate lock profile pointer from spinlock structure when !LOCK_PROFILE


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 07 Aug 2012 20:33:26 +0000
  • Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1344344957 -7200
# Node ID 817f5f381d1bb443fb4c517829dca5f47acca9ab
# Parent  5fb24be93a2ae41e60690a9a3f1385112c05c06c
eliminate lock profile pointer from spinlock structure when !LOCK_PROFILE

This pointer is never used for anything, and needlessly increases the
memory footprint of various pieces of data.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 5fb24be93a2a -r 817f5f381d1b xen/include/xen/spinlock.h
--- a/xen/include/xen/spinlock.h        Tue Aug 07 13:42:32 2012 +0200
+++ b/xen/include/xen/spinlock.h        Tue Aug 07 15:09:17 2012 +0200
@@ -115,11 +115,10 @@ extern void spinlock_profile_reset(unsig
 
 #else
 
-struct lock_profile { };
 struct lock_profile_qhead { };
 
 #define SPIN_LOCK_UNLOCKED                                                    \
-    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, NULL }
+    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG }
 #define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED
 
 #define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))
@@ -133,7 +132,9 @@ typedef struct spinlock {
     u16 recurse_cpu:12;
     u16 recurse_cnt:4;
     struct lock_debug debug;
+#ifdef LOCK_PROFILE
     struct lock_profile *profile;
+#endif
 } spinlock_t;
 
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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