This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/55354] [asan] by default, the asan run-time should be linked statically, not dynamically


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55354

--- Comment #13 from Konstantin Serebryany <konstantin.s.serebryany at gmail dot com> 2012-11-19 04:13:23 UTC ---
>> of course everything would need to be done only given appropriate benchmarks of real-world programs.

We have a synthetic benchmark which perfectly reflects the only major hot spot
in tsan: the set of functions __tsan_{read,write}{1,2,4,8} that are called on
every memory access.


When building libtsan as a shared library (for which I had to hack our assembly
blobs a bit) we get two sources of slowdown: 
  1. __tsan_read8 and friends are called through PLT
  2. __tsan_read8 and friends use one extra load to get to TLS

The result is > 10% slowdown.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]