ClickHouse/contrib/jemalloc-cmake
Azat Khuzhin 669ce7cd40 Enable jemalloc heap profiler by default for debug builds as well
Since the issue with jemalloc assertion is clear, let's revert that
workaround

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-07-14 08:21:13 +02:00
..
include/jemalloc Bump jemalloc to fix possible assertion 2022-07-12 07:57:27 +03:00
include_darwin_aarch64/jemalloc/internal Bump jemalloc to fix possible assertion 2022-07-12 07:57:27 +03:00
include_darwin_x86_64/jemalloc/internal Bump jemalloc to fix possible assertion 2022-07-12 07:57:27 +03:00
include_freebsd_aarch64/jemalloc/internal Bump jemalloc to fix possible assertion 2022-07-12 07:57:27 +03:00
include_freebsd_ppc64le/jemalloc/internal Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00
include_freebsd_x86_64/jemalloc/internal Bump jemalloc to fix possible assertion 2022-07-12 07:57:27 +03:00
include_linux_aarch64/jemalloc/internal Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00
include_linux_ppc64le/jemalloc/internal Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00
include_linux_riscv64/jemalloc/internal Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00
include_linux_s390x/jemalloc/internal Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00
include_linux_x86_64/jemalloc/internal Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00
include_linux_x86_64_musl/jemalloc/internal Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00
CMakeLists.txt Enable jemalloc heap profiler by default for debug builds as well 2024-07-14 08:21:13 +02:00
README Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE 2024-07-14 08:21:13 +02:00

It allows to integrate JEMalloc into CMake project.

- Remove JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF because it's non standard.
- Added JEMALLOC_CONFIG_MALLOC_CONF substitution
- Add musl support (USE_MUSL)
- Also note, that darwin build requires JEMALLOC_PREFIX, while others do not
- JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE should be disabled

  CLOCK_MONOTONIC_COARSE can go backwards after clock_adjtime(ADJ_FREQUENCY)
  Let's disable it for now, and this menas that CLOCK_MONOTONIC will be used,
  and this, should not be a problem, since:
  - jemalloc do not call clock_gettime() that frequently
  - the difference is CLOCK_MONOTONIC 20ns and CLOCK_MONOTONIC_COARSE 4ns

  This can be done with the following command:

      gg JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE | cut -d: -f1 | xargs sed -i 's@#define JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE@/* #undef JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE */@'