summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alkondratenko@gmail.com>2017-11-29 21:15:04 +0000
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2017-11-29 21:44:52 +0000
commit79c91a9810c928d7f6d0cb168c10ce470a714aa8 (patch)
treec726f08a77e13c79ca63b814259485ce30d6a0cb
parent03da6afff57c12845260997213b6ad89e420bab3 (diff)
downloadgperftools-79c91a9810c928d7f6d0cb168c10ce470a714aa8.tar.gz
always define empty PERFTOOLS_NOTHROW
Because somehow clang still builds "this function will not throw" code even with noexcept. Which breaks performance of tc_malloc/tc_new_nothrow. The difference with throw() seems to be just which function is called when unexpected exception happens. So we work around this sillyness by simply dropping any exception specification when compiling tcmalloc.
-rw-r--r--src/tcmalloc.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/tcmalloc.cc b/src/tcmalloc.cc
index 3b598f1..c37846f 100644
--- a/src/tcmalloc.cc
+++ b/src/tcmalloc.cc
@@ -90,9 +90,7 @@
#include "config.h"
// At least for gcc on Linux/i386 and Linux/amd64 not adding throw()
// to tc_xxx functions actually ends up generating better code.
-#if defined(__GNUC__) && (__cplusplus < 201103L)
#define PERFTOOLS_NOTHROW
-#endif
#include <gperftools/tcmalloc.h>
#include <errno.h> // for ENOMEM, EINVAL, errno