Commit Graph

83 Commits

Author SHA1 Message Date
Azat Khuzhin
eba636613a contrib/jemalloc: use hidden library
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-21 10:11:22 +03:00
Azat Khuzhin
a6d482d3e1 Cleanup jemalloc contrib 2022-01-20 10:02:03 +03:00
Azat Khuzhin
4709ff9340 More generic check for CMAKE_BUILD_TYPE in jemalloc 2021-12-04 09:19:34 +03:00
Vladimir Smirnov
48451182f8 Initial support for risc-v
Make ClickHouse compilable and runnable on risc-v 64

So far only basic functionality was tested (on real hw),
clickhouse server runs, exceptions works, client works,
simple tests works.

What doesn't work:
 1. traces - they are always empty
 2. system.stack_trace only have first frame
2021-11-11 19:23:34 +01:00
Alexey Milovidov
41acc52458 Preparation to build with Musl 2021-10-16 00:17:34 +03:00
Alexey Milovidov
d4e496c314 Add support for PowerPC build 2021-10-12 01:47:57 +03:00
mikael
714ac8efc4 FreeBSD aarch64 doesn't implement sbrk 2021-10-10 14:52:42 +02:00
Azat Khuzhin
6a600e5f6f jemalloc: fix under osx (zone_register() had been optimized out again)
v2: use ld -u
v3: move -u to executable
2021-08-18 09:47:59 +03:00
Azat Khuzhin
342c3fae3a Revert "Disable jemalloc under OSX" (only jemalloc hunk)
This reverts commit f062aa8574.
2021-08-18 09:47:59 +03:00
Raúl Marín
f062aa8574 Disable jemalloc under OSX 2021-08-16 18:04:46 +02:00
sdk2
717f7ed01b
Update contrib/jemalloc-cmake/CMakeLists.txt 2021-06-07 16:38:24 +08:00
Alexey Milovidov
4ff812db7f Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
Maksim Kita
4be441c6d5
Merge branch 'master' into support-apple-m1 2021-04-16 23:33:12 +03:00
Azat Khuzhin
29281ea6e0 jemalloc: set muzzy_decay_ms/dirty_decay_ms to 5s 2021-04-16 10:54:11 +03:00
Azat Khuzhin
da6dc64e04 jemalloc: set dirty_decay_ms/muzzy_decay_ms to 1 second 2021-04-15 00:34:46 +03:00
changvvb
06e23ab981
Apply suggestions from code review
Co-authored-by: Denis Glazachev <traceon@users.noreply.github.com>
2021-04-10 20:08:49 +08:00
changvvb
facbb0368b Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into support-apple-m1 2021-04-09 23:19:19 +08:00
Denis Glazachev
4e58b6fe11 Syntax fix 2021-04-08 19:07:34 +04:00
Denis Glazachev
4b116c214c Disable jemalloc for ALL macOS non-RelWithDebInfo builds
Revisit default ENABLE_* flag setting
2021-04-08 19:05:04 +04:00
Nicolae Vartolomei
dd75447514 Experiment building jemalloc with profiling support for all builds to see how it impacts performance tests 2021-04-08 09:52:28 +01:00
changvvb
fdcf077cf5 Disabled rocksdb jemalloc 2021-04-06 17:06:18 +08:00
changvvb
1f8bd034a3 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into support-apple-m1 2021-04-06 15:55:03 +08:00
mastertheknife
2d83cb38a3 ppc64le: Enable building with jemalloc 2021-04-01 18:25:42 +03:00
changvvb
c1c5db1944 Update jemalloc_internal_defs & fix unit test 2021-03-30 00:07:34 +08:00
Azat Khuzhin
c160b251ba Drop support for unbundled jemalloc
unbundled jemalloc cannot be used, since it includes jemalloc_cpp.o that
contains new/delete overrides, so as clickhouse [1]:

    ld.lld: error: duplicate symbol: operator delete(void*, unsigned long)
    >>> defined at new_delete.cpp:147 (../src/Common/new_delete.cpp:147)
    >>>            new_delete.cpp.o:(operator delete(void*, unsigned long)) in archive src/libclickhouse_new_delete.a
    >>> defined at jemalloc_cpp.o:(.text+0x160) in archive /usr/lib/x86_64-linux-gnu/libjemalloc.a

  [1]: https://clickhouse-builds.s3.yandex.net/15828/35335f07dbf8cab89b4188a674b033c28409dc7b/clickhouse_build_check/build_log_793952627_1602401325.txt
2020-10-11 11:18:56 +03:00
Azat Khuzhin
35335f07db Fix INTERFACE_COMPILE_DEFINITIONS for IMPORTED targets
INTERFACE_COMPILE_DEFINITIONS does not work IMPORTED targets:

From 3.6:

    Specify compile definitions to use when compiling a given <target>.
    The named <target> must have been created by a command such as
    add_executable() or add_library() and must not be an Imported Target.

Since 3.11:

    Specify compile definitions to use when compiling a given <target>.
    The named <target> must have been created by a command such as
    add_executable() or add_library() and must not be an ALIAS target.

And this causes the -Wundef warning:
    src/Functions/FunctionsHashing.h:1326:5: warning: 'USE_XXHASH' is not defined, evaluates to 0 [-Wundef]
2020-10-11 09:06:01 +03:00
Konstantin Podshumok
0ad4b5dea6
cmake: disable jemalloc on alternative arches and with sanitizers
Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
2020-08-25 20:16:39 +03:00
Konstantin Podshumok
d456aa86ef
Revert "Revert "cmake: Add option to fail configuration instead of auto-reconfiguration""
This reverts commit 89419ceb9b
(curl part moved to separate commit)

Squashed:
- termcap removed
- fix for cassandra on apple merged
- cmake: fix "Can't find system zlib library" in unbundled build
- cmake: fix condition when testing for rdkafka platform
- cmake: PROTOBUF_OLD_ABI_COMPAT shouldn't be enabled for internal protobuf

Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
2020-08-25 20:16:37 +03:00
alexey-milovidov
89419ceb9b
Revert "cmake: Add option to fail configuration instead of auto-reconfiguration" 2020-08-13 23:10:06 +03:00
Konstantin Podshumok
262080132b cmake: disabling silent reconfigurations in contrib/*/CMakeLists.txt
Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
2020-08-09 21:37:46 +03:00
Alexander Kuzmenkov
8c0177b216
Update contrib/jemalloc-cmake/CMakeLists.txt 2020-06-29 15:01:29 +03:00
Alexander Kuzmenkov
8b82ff215f muzzy decay 10 ms 2020-06-27 04:08:21 +03:00
Azat Khuzhin
236cac3d52 Fix jemalloc under OSX (by registering it as default zone explicitly)
In case of OSX jemalloc register itself as a default zone allocator.

But when you link statically then zone_register() will not be called,
and even will be optimized out:

  $ nm clickhouse.patched  | grep -c zone_register
  0

Fix this, by manually calling it.

v2: extern C
2020-06-24 21:05:35 +03:00
Azat Khuzhin
f76511668f jemalloc: disable it for darwin
Right now it aborts (Abort trap: 6) on osx, the issue does not looks
like [1], but should be investigated, so disable for now.

What is interesting that it works under debugger, so I guess it is
indeed the order of symbol replacements...

  [1]: https://github.com/jemalloc/jemalloc/issues/420
2020-06-23 11:40:34 +03:00
Azat Khuzhin
c230d76cb9 jemalloc: disable percpu_arena on non-linux (not supported anyway)
And since it does not supported it produces the following warning:
  <jemalloc>: No getcpu support: percpu_arena:percpu
  <jemalloc>: perCPU arena getcpu() not available. Setting narenas to 8.

However it is uses narenas=ncpu instead of default narenas=ncpu*4
2020-06-23 11:14:22 +03:00
Azat Khuzhin
5b5ba93523 jemalloc: explicitly disable pthread_setname_np on freebsd (requires 12.1) 2020-06-23 05:45:56 +03:00
Azat Khuzhin
8b6e2e6c67 jemalloc: drop superfluous include directory 2020-06-23 01:47:56 +03:00
Azat Khuzhin
77a3f606f4 jemalloc: enable by default for freebsd/darwin 2020-06-23 01:47:56 +03:00
Azat Khuzhin
1354a103ab jemalloc: add darwin pregenerated header 2020-06-23 01:47:56 +03:00
Azat Khuzhin
637f2cefeb jemalloc: add freebsd pregenerated header 2020-06-23 01:47:56 +03:00
Azat Khuzhin
f0bb511468 jemalloc: fix JEMALLOC_NOTHROW/JEMALLOC_CXX_THROW for freebsd/darwin 2020-06-23 01:47:56 +03:00
Azat Khuzhin
1becc6ca02 jemalloc: jemalloc_preamble.h is common 2020-06-23 01:47:56 +03:00
Azat Khuzhin
6704c42a9e jemalloc: fix HAVE_CPU_SPINWAIT for linux aarch64
Fixes: #11163
2020-06-22 23:24:43 +03:00
Azat Khuzhin
210e67d831 jemalloc: allow changing default malloc_conf without purging cmake cache 2020-05-27 02:19:13 +03:00
Azat Khuzhin
b694d6ed8c jemalloc: disable oversize_threshold (slower) 2020-05-27 02:19:13 +03:00
Azat Khuzhin
a8749c5d5c jemalloc: aarch64 does not have pause 2020-05-27 02:19:13 +03:00
Azat Khuzhin
bc572dc5f2 jemalloc: sync common (non per-arch) pre-generated headers
$ for f in include/jemalloc/jemalloc_*.h; do cp /src/oss/jemalloc/$f $f; done
2020-05-27 02:19:13 +03:00
Azat Khuzhin
5cd31dbf0d jemalloc: add _GNU_SOURCE for RTLD_NEXT 2020-05-27 02:19:13 +03:00
Azat Khuzhin
9f1cefd8df jemalloc: disable secure_getenv() 2020-05-27 02:19:13 +03:00
Azat Khuzhin
82f2b1a986 jemalloc: merge jemalloc_internal_defs.h.in for aarch64
- keep LG_PAGE/LG_HUGEPAGE
- use upstream JEMALLOC_PURGE_MADVISE_FREE
2020-05-27 02:19:13 +03:00