Commit Graph

57 Commits

Author SHA1 Message Date
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
Azat Khuzhin
2f256b0d2d jemalloc: merge jemalloc_internal_defs.h.in for x86_64
- Use upstream JEMALLOC_PURGE_MADVISE_FREE
2020-05-27 02:19:13 +03:00
Azat Khuzhin
2590ee64d9 jemalloc: merge jemalloc_preamble.h for aarch64 2020-05-27 02:19:13 +03:00
Azat Khuzhin
b2ff1b3f20 jemalloc: merge jemalloc_preamble.h for x86_64 2020-05-27 02:19:13 +03:00
Azat Khuzhin
bbb38664c1 jemalloc: add missing safety_check.c 2020-05-27 02:19:13 +03:00
Azat Khuzhin
734cc78e58 jemalloc: make include_linux_*/jemalloc/*.h common for aarch64 and x86_64
This patch can go upstream, regardless of the jemalloc update
eventually.

Also I noticed that header with jemalloc version differs (someone forgot
to update?)
2020-05-27 02:19:13 +03:00
Alexey Milovidov
14b61cfa9e Fix JEMalloc conf after #11084 2020-05-22 16:08:08 +03:00
Azat Khuzhin
5da41d5cd6 Configure jemalloc options via cmake 2020-05-21 11:43:29 +03:00
Azat Khuzhin
58ffa4c59c Enable percpu_arena:percpu for jemalloc
This will reduce memory fragmentation due to thread pool.
2020-05-21 01:01:28 +03:00
Alexey Milovidov
c0e68df0ff Fix build 2020-05-10 02:06:03 +03:00
Alexey Milovidov
99ceb12b19 Remove unnecessary warning suppressions #10396 2020-05-09 23:30:28 +03:00
Ivan Lezhankin
26e81a2bbf Add dl library dependency 2020-03-31 21:58:00 +03:00
Ivan Lezhankin
db6e374d39 Fix build for ancient CMake 2020-03-30 15:06:30 +03:00
Ivan Lezhankin
03d3332d43 Fix cmake for unbundled build 2020-03-22 13:51:58 +03:00
Ivan Lezhankin
86cb4811b5 Build shared jemalloc in splitted mode 2020-03-21 22:49:26 +03:00
Ivan Lezhankin
5a2e829489 Some fixes 2020-03-18 15:29:51 +03:00
Ivan Lezhankin
528e42bc4c Improve jemalloc contrib 2020-03-18 15:29:51 +03:00
alexey-milovidov
8a313e9f31
Revert "Update JEMalloc just in case" 2020-03-10 20:28:14 +03:00
Alexey Milovidov
06e00b2018 Fixed build 2020-03-09 07:08:19 +03:00
Alexey Milovidov
b75927e4ed Update JEMalloc just in case 2020-03-08 01:59:56 +03:00
Amos Bird
937d0ab8fb
Fix misconfigured jemalloc 2019-12-17 14:22:29 +08:00
Amos Bird
b0d4baccc8 Enable musl and jemalloc for arm.
Can generate better arm packages.
2019-10-14 00:06:54 +08:00
proller
594c535bd4 Build fixes (#7063)
* Build fixes

*            fix

* Fix

* fix

* Fix install(export..

* Freebsd fixes

* Freebsd fixes

* Fix warning

* fix

* More PRIVATE linking

* Fix review

* Timmy

* fix

* fix
2019-10-05 22:25:31 +03:00
Ivan
b4339f266d
Make a better build scheme (#6500)
* Fix shared build
* Major default libs refactor
* Fix build with gcc_eh
* Link all libraries as a big group.
* Use global interface library as a group
* Build capnproto using our cmake
* Use only internal libunwind
2019-08-28 23:49:37 +03:00
chertus
18a13a03dd memory tracked new/delete concept 2019-07-10 21:12:50 +03:00
proller
c800913e5a
Fix build clickhouse as submodule (#5574) 2019-06-10 21:50:46 +03:00
Danila Kutenin
203d336f1f Revert jemalloc and supress all warnings because we cannot supress some general ones with another flag 2019-05-31 20:33:29 +03:00