Commit Graph

164 Commits

Author SHA1 Message Date
Aliaksey Kandratsenka
b96dc99dbf one trivial config cleanup 2023-07-02 22:30:00 -04:00
Aliaksey Kandratsenka
b7e47a77c0 simplify heap checker building default to be Linux-only
This also fixes cmake and freebsd where previously check for freebsd
wasn't working.
2023-07-02 22:30:00 -04:00
Aliaksey Kandratsenka
54605b8a58 amputate old atomic ops implementation 2023-07-02 22:30:00 -04:00
Aliaksey Kandratsenka
0451d21e83 use libunwind when it actually works
Previously we blindly tried to use libunwind whenever header is
detected. Even if actually working libunwind library is missing. This
is now fixed, so we attempt to use libunwind when it actually works.

Somehow recent freebsd ships libunwind.h (which seems to belong to
llvm's implementation), but apparently without matching .so. So then building
and linking failed.
2023-07-02 21:28:30 -04:00
Aliaksey Kandratsenka
c37f6c4c7c fix deprecated autoconf bits
As part of that we also upgrade required autoconf version to 2.69
which is what I see in rhel/centos 7 and ubuntu 14.04. Both are old
enough. And, of course, .tar.gz releases still ship "packaged" configure,
so will work on older distros.

This fixes issue #1335.
2023-07-02 21:28:30 -04:00
Aliaksey Kandratsenka
bf8b714bf5 bump version to 2.10 2022-05-30 21:21:21 -07:00
Aliaksey Kandratsenka
f7c6fb6c8e bump version to 2.9.1 2021-03-02 19:32:07 -08:00
Aliaksey Kandratsenka
c2f60400a8 prefer backtrace() on OSX
It seems to work and _Unwind_Backtrace which is configured otherwise
doesn't.
2021-02-28 17:52:17 -08:00
Aliaksey Kandratsenka
47b5b59ca9 bump version to 2.9 2021-02-21 15:16:06 -08:00
Aliaksey Kandratsenka
96ba58e19b bump version to 2.9rc 2021-02-14 23:18:57 -08:00
Aliaksey Kandratsenka
4cf7dd0a75 enable emergency_malloc on all architectures with mmap
It is actually needed for libgcc backtracer from time to time. And
we've seen libunwind to need it too. Plus we've not heard of any
problems with it. So lets just always enable it.

This should fix github issue #1248.
2021-02-14 22:28:34 -08:00
Aliaksey Kandratsenka
17bab484ae always respect --enable-frame-pointers
Previously it only was respected on x86_64, but this days lots of modern
ABIs are without frame pointers by default (e.g. arm64 and riscv, and
even older mips).
2021-02-14 16:44:28 -08:00
Aliaksey Kandratsenka
419c85814d amputate unused dynamic annotations support 2021-02-14 16:09:17 -08:00
Aliaksey Kandratsenka
95b52b0504 don't check for unused uname symbol 2021-02-14 15:44:14 -08:00
Aliaksey Kandratsenka
ac68c97187 don't check for useless __builtin_stack_pointer
It doesn't seem to be supported anyways, and we're not using it too.
2021-02-14 15:44:14 -08:00
Aliaksey Kandratsenka
7c106ca241 don't bother checking for stl namespace and use std
Because there are no compilers left that don't do std namespace.
2021-02-14 15:44:14 -08:00
Aliaksey Kandratsenka
0d6f32b9ce use standard way to print size_t-sized ints
I.e. just use zu/zd/zx instead of finding out right size and defining
PRI{u,x,d}S defines. Compilers have long caught up to this part of
standard.
2021-02-14 15:44:14 -08:00
Aliaksey Kandratsenka
0c11d35f4a amputate checking for __int64
Since everything supports stdint.h this days.
2021-02-14 15:44:14 -08:00
Aliaksey Kandratsenka
9bb2937261 amputate checking for inline keyword support
It is supported everywhere now.
2021-02-14 15:12:19 -08:00
Đoàn Trần Công Danh
43459feb33 configure.ac: check for features.h once 2021-02-14 11:28:07 -08:00
Aliaksey Kandratsenka
d8eb315fb1 bump version to 2.8.1 2020-12-20 23:35:08 -08:00
Aliaksey Kandratsenka
180bfa10d7 bumped version to 2.8 2020-07-06 02:51:43 -07:00
Aliaksey Kandratsenka
6b92e00cec don't assume HAVE_MMAP on mingw builds
Fixes github issue #1108.
2020-03-23 01:15:40 -07:00
Aliaksey Kandratsenka
db7aa547ab bumped version to 2.8rc 2020-03-08 21:06:08 -07:00
Henrik Edin
d3fefdb694 Allow configuring page size to 4K, 8K, 16K, 32K, 64K, 128K and 256K 2020-02-09 23:26:06 -08:00
Aliaksey Kandratsenka
c1d546d7b2 never test and always default HAVE_MMAP to on
This should alleviate vboxfs problems from issue #1008.
2019-04-07 21:48:00 -07:00
Laurent Stacul
5574c87e39 Compile time aggressive decommit option
[alkondratenko@gmail.com: performed s/agressive/aggressive/g]
Signed-off-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
2019-02-10 11:14:23 -08:00
Fabrice Fontaine
1561f0946f check for __sbrk
__sbrk is not defined in musl so add a check for it in configure.ac and
replace the check on ifndef __UCLIBC__ by a check on ifdef HAVE__SBRK
in src/malloc_hook_mmap_linux.h

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-10-06 16:58:55 -07:00
Aliaksey Kandratsenka
954f9dc0e3 Add flag to disable installing unmaintained & deprecated pprof.
Everyone should be using golang pprof from github.com/google/pprof, but
distros still ship our perl version and not everyone is aware of
better pprof yet.

This is another step in completely dropping perl pprof. We still
default to installing it, but hopefully we'll be able to convince
distros to disable this soon.

We still install pprof under pprof-symbolize name because
stack traces symbolization depends on it, and because golang pprof
won't support this feature.

This is related to issue #1038.
2018-08-26 11:37:59 -07:00
Gabriel Marin
f02e28f348 Replace builtin_expect configure test with a direct GCC compiler check 2018-08-05 16:07:51 -07:00
Aliaksey Kandratsenka
44da4ce539 build with c++11 or later 2018-08-05 15:15:10 -07:00
Junhao Li
fe87ffb7ea Disable large allocation report by default
Fixes issue #360.

[alkondratenko@gmail.com: adjusted commit message a bit]
[alkondratenko@gmail.com: adjusted configure help message]
Signed-off-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
2018-05-20 21:13:05 -07:00
Aliaksey Kandratsenka
9608fa3bcf bumped version to 2.7 2018-04-29 23:00:34 -07:00
Aliaksey Kandratsenka
34f78a2dcd bumped version to 2.7rc 2018-03-18 16:40:44 -07:00
Aliaksey Kandratsenka
d7be938560 implement more robust detection of sized delete support
As reported in issue #954, osx clang compiler is able to optimize our
previous detection away while not really having runtime support for
sized delete. So this time we use AC_LINK_IFELSE and more robust code
to prevent compiler from optimizing away sized delete call. This
should reliably catch "bad" compilers.

Special thanks to Alexey Serbin for reporting the issue, suggesting a
fix and verifying it.

Fixes issue #954.
2018-03-04 23:41:26 -08:00
Aliaksey Kandratsenka
71bf09aabe bumped version to 2.6.3 2017-12-09 09:59:37 -08:00
Stephan Zuercher
8b1d13c631 configure.ac: use link check for std::align_val_t 2017-12-09 09:06:52 -08:00
Stephan Zuercher
36ab068baa configure.ac: better test for -faligned-new
XCode 9 provides only partial support for aligned new/delete when -faligned-new
is specified. Require successful linking to enable aligned new/delete.
2017-12-09 09:06:52 -08:00
Aliaksey Kandratsenka
6a4b079997 bumped version to 2.6.2 2017-11-30 18:19:17 +00:00
Andrey Semashev
7efb3ecf37 Add support for C++17 operator new/delete for overaligned types.
- Add auto-detection of std::align_val_t presence to configure scripts. This
  indicates that the compiler supports C++17 operator new/delete overloads
  for overaligned types.

- Add auto-detection of -faligned-new compiler option that appeared in gcc 7.
  The option allows the compiler to generate calls to the new operators. It is
  needed for tests.

- Added overrides for the new operators. The overrides are enabled if the
  support for std::align_val_t has been detected. The implementation is mostly
  based on the infrastructure used by memalign, which had to be extended to
  support being used by C++ operators in addition to C functions. In particular,
  the debug version of the library has to distinguish memory allocated by
  memalign from that by operator new. The current implementation of sized
  overaligned delete operators do not make use of the supplied size argument
  except for the debug allocator because it is difficult to calculate the exact
  allocation size that was used to allocate memory with alignment. This can be
  done in the future.

- Removed forward declaration of std::nothrow_t. This was not portable as
  the standard library is not required to provide nothrow_t directly in
  namespace std (it could use e.g. an inline namespace within std). The <new>
  header needs to be included for std::align_val_t anyway.

- Fixed operator delete[] implementation in libc_override_redefine.h.

- Moved TC_ALIAS definition to the beginning of the file in tcmalloc.cc so that
  the macro is defined before its first use in nallocx.

- Added tests to verify the added operators.

[alkondratenko@gmail.com: fixed couple minor warnings, and some
whitespace change]
[alkondratenko@gmail.com: removed addition of TC_ALIAS in debug allocator]
Signed-off-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
2017-11-29 19:51:42 +00:00
Aliaksey Kandratsenka
bf840dec04 bumped version to 2.6.1 2017-07-09 14:55:33 -07:00
Aliaksey Kandratsenka
4be05e43a1 bumped version up to 2.6 2017-07-04 20:35:25 -07:00
Aliaksey Kandratsenka
c571ae2fc9 2.6rc4 2017-05-22 19:04:20 -07:00
Aliaksey Kandratsenka
f2bae51e7e Revert "Revert "disable dynamic sized delete support by default""
This reverts commit b82d89cb7c.

Dynamic sized delete support relies on ifunc handler being able to
look up environment variable. The issue is, when stuff is linked with
-z now linker flags, all relocations are performed early. And sadly
ifunc relocations are not treated specially. So when ifunc handler
runs, it cannot rely on any dynamic relocations at all, otherwise
crash is real possibility. So we cannot afford doing it until (and if)
ifunc is fixed.

This was brought to my attention by Fedora people at
https://bugzilla.redhat.com/show_bug.cgi?id=1452813
2017-05-22 18:58:15 -07:00
Aliaksey Kandratsenka
6426c0cc80 2.6rc3 2017-05-22 03:08:30 -07:00
Aliaksey Kandratsenka
f7ff175b92 add configure-time warning on unsupported backtrace capturing
Both libgcc and libc's backtrace() are not really options for stack
trace capturing from inside profiling signal handler. So lets warn
people.
2017-05-22 01:55:50 -07:00
Aliaksey Kandratsenka
cef582350c align fast-path functions only if compiler supports that
Apparently gcc only supports __attribute__((aligned(N))) on functions
only since version 4.3. So lets test it in configure script and only
use when possible. We now use CACHELINE_ALIGNED_FN macro for aligning
functions.
2017-05-22 01:55:50 -07:00
Aliaksey Kandratsenka
50125d8f70 2.6rc2 2017-05-15 00:02:43 -07:00
Aliaksey Kandratsenka
a5e8e42a47 don't link-in libunwind if libunwind.h is missing
I got report that some build environments for
https://github.com/lyft/envoy are having link-time issue due to
linking libunwind. It was happening despite libunwind.h being present,
which is clear bug as without header we won't really use libunwind.
2017-05-14 23:45:08 -07:00
Aliaksey Kandratsenka
b48403a4b0 2.6rc 2017-05-14 22:00:28 -07:00