[compiler-rt] r174958 - [asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part

Kostya Serebryany kcc at google.com
Tue Feb 12 03:11:58 PST 2013


Author: kcc
Date: Tue Feb 12 05:11:58 2013
New Revision: 174958

URL: http://llvm.org/viewvc/llvm-project?rev=174958&view=rev
Log:
[asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part

Modified:
    compiler-rt/trunk/lib/asan/asan_interface_internal.h
    compiler-rt/trunk/lib/asan/asan_mapping.h

Modified: compiler-rt/trunk/lib/asan/asan_interface_internal.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interface_internal.h?rev=174958&r1=174957&r2=174958&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interface_internal.h (original)
+++ compiler-rt/trunk/lib/asan/asan_interface_internal.h Tue Feb 12 05:11:58 2013
@@ -22,7 +22,11 @@ using __sanitizer::uptr;
 extern "C" {
   // This function should be called at the very beginning of the process,
   // before any instrumented code is executed and before any call to malloc.
-  void __asan_init() SANITIZER_INTERFACE_ATTRIBUTE;
+  // Everytime the asan ABI changes we also change the version number in this
+  // name. Objects build with incompatible asan ABI version 
+  // will not link with run-time.
+  void __asan_init_v1() SANITIZER_INTERFACE_ATTRIBUTE;
+  #define __asan_init __asan_init_v1
 
   // This structure describes an instrumented global variable.
   struct __asan_global {

Modified: compiler-rt/trunk/lib/asan/asan_mapping.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_mapping.h?rev=174958&r1=174957&r2=174958&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mapping.h (original)
+++ compiler-rt/trunk/lib/asan/asan_mapping.h Tue Feb 12 05:11:58 2013
@@ -36,7 +36,7 @@ extern SANITIZER_INTERFACE_ATTRIBUTE upt
 #   if defined(__powerpc64__)
 #    define SHADOW_OFFSET (1ULL << 41)
 #   else
-#    define SHADOW_OFFSET (1ULL << 44)
+#    define SHADOW_OFFSET 0x7fff8000ULL
 #   endif
 #  endif
 # endif





More information about the llvm-commits mailing list