[v6,3/5] x86/mem_sharing: enable mem_share audit mode only in debug builds
diff mbox series

Message ID 20190717193335.11991-4-tamas@tklengyel.com
State New
Headers show
Series
  • x86/mem_sharing: assorted fixes
Related show

Commit Message

Tamas K Lengyel July 17, 2019, 7:33 p.m. UTC
Improves performance for release builds.

Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Roger Pau Monne <roger.pau@citrix.com>
---
v6: patch ping
---
 xen/include/asm-x86/mem_sharing.h | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/xen/include/asm-x86/mem_sharing.h b/xen/include/asm-x86/mem_sharing.h
index 9f9f7e93e3..afd0c17292 100644
--- a/xen/include/asm-x86/mem_sharing.h
+++ b/xen/include/asm-x86/mem_sharing.h
@@ -25,7 +25,11 @@ 
 #include <public/memory.h>
 
 /* Auditing of memory sharing code? */
+#ifndef NDEBUG
 #define MEM_SHARING_AUDIT 1
+#else
+#define MEM_SHARING_AUDIT 0
+#endif
 
 typedef uint64_t shr_handle_t;