]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
eliminate lock profile pointer from spinlock structure when !LOCK_PROFILE
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Aug 2012 13:09:17 +0000 (15:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Aug 2012 13:09:17 +0000 (15:09 +0200)
This pointer is never used for anything, and needlessly increases the
memory footprint of various pieces of data.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/include/xen/spinlock.h

index 8133fe0934e8d461dc0ef15860f5e61f33e18319..76581c5cc290838223be80fcf336776dca1adac3 100644 (file)
@@ -115,11 +115,10 @@ extern void spinlock_profile_reset(unsigned char key);
 
 #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;