diff options
author | Jan Beulich <jbeulich@suse.com> | 2012-08-07 15:09:17 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2012-08-07 15:09:17 +0200 |
commit | 2a9fbb27320c7cdf0a58003c7e8d752def737ecd (patch) | |
tree | 4c9c4c03d0dd39cccd9429929a9a734aaf7447eb | |
parent | e7ca7191e5b2f57aa9b9ed0db47f3b14aaee9403 (diff) | |
download | xen-2a9fbb27320c7cdf0a58003c7e8d752def737ecd.tar.gz xen-2a9fbb27320c7cdf0a58003c7e8d752def737ecd.tar.bz2 xen-2a9fbb27320c7cdf0a58003c7e8d752def737ecd.zip |
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@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/include/xen/spinlock.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index 8133fe0934..76581c5cc2 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -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; |