Skip to content

Commit df187a0

Browse files
committed
auto merge of #9933 : alexcrichton/rust/no-jemalloc, r=brson
As discovered in #9925, it turns out that we weren't using jemalloc on most platforms. Additionally, on some platforms we were using it incorrectly and mismatching the libc version of malloc with the jemalloc version of malloc. Additionally, it's not clear that using jemalloc is indeed a large performance win in particular situtations. This could be due to building jemalloc incorrectly, or possibly due to using jemalloc incorrectly, but it is unclear at this time. Until jemalloc can be confirmed to integrate correctly on all platforms and has verifiable large performance wins on platforms as well, it shouldn't be part of the default build process. It should still be available for use via the LD_PRELOAD trick on various architectures, but using it as the default allocator for everything would require guaranteeing that it works in all situtations, which it currently doesn't. Closes #9925
2 parents 6b07d88 + 90911d7 commit df187a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2
-44521
lines changed

configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ do
684684
make_dir $t/rt/libuv/src/ares
685685
make_dir $t/rt/libuv/src/eio
686686
make_dir $t/rt/libuv/src/ev
687-
make_dir $t/rt/jemalloc
688687
for i in \
689688
isaac sync test \
690689
arch/i386 arch/x86_64 arch/arm arch/mips \

mk/rt.mk

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ $$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJ_$
145145
$$(Q)$(AR_$(1)) rcs $$@ $$<
146146

147147
$$(RT_BUILD_DIR_$(1)_$(2))/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)_$(2)) $$(MKFILE_DEPS) \
148-
$$(RUNTIME_DEF_$(1)_$(2)) $$(LIBUV_LIB_$(1)) $$(JEMALLOC_LIB_$(1))
148+
$$(RUNTIME_DEF_$(1)_$(2)) $$(LIBUV_LIB_$(1))
149149
@$$(call E, link: $$@)
150150
$$(Q)$$(call CFG_LINK_CXX_$(1),$$@, $$(RUNTIME_OBJS_$(1)_$(2)) \
151-
$$(JEMALLOC_LIB_$(1)) $$(CFG_GCCISH_POST_LIB_FLAGS_$(1)) $$(LIBUV_LIB_$(1)) \
151+
$$(LIBUV_LIB_$(1)) \
152152
$$(CFG_LIBUV_LINK_FLAGS_$(1)),$$(RUNTIME_DEF_$(1)_$(2)),$$(CFG_RUNTIME_$(1)))
153153

154154
# These could go in rt.mk or rustllvm.mk, they're needed for both.
@@ -197,27 +197,22 @@ define DEF_THIRD_PARTY_TARGETS
197197
# $(1) is the target triple
198198

199199
RT_OUTPUT_DIR_$(1) := $(1)/rt
200-
JEMALLOC_TARGET_$(1) := jemalloc_pic
201200

202201
ifeq ($$(CFG_WINDOWSY_$(1)), 1)
203202
LIBUV_OSTYPE_$(1) := win
204-
JEMALLOC_TARGET_$(1) := jemalloc
205203
else ifeq ($(OSTYPE_$(1)), apple-darwin)
206204
LIBUV_OSTYPE_$(1) := mac
207205
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
208206
LIBUV_OSTYPE_$(1) := freebsd
209207
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
210208
LIBUV_OSTYPE_$(1) := android
211-
JEMALLOC_ARGS_$(1) := --disable-tls
212209
LIBUV_ARGS_$(1) := PLATFORM=android host=android OS=linux
213210
else
214211
LIBUV_OSTYPE_$(1) := linux
215212
endif
216213

217214
LIBUV_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),uv)
218215
LIBUV_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/libuv/$$(LIBUV_NAME_$(1))
219-
JEMALLOC_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),$$(JEMALLOC_TARGET_$(1)))
220-
JEMALLOC_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/jemalloc/lib/$$(JEMALLOC_NAME_$(1))
221216

222217
LIBUV_MAKEFILE_$(1) := $$(CFG_BUILD_DIR)$$(RT_OUTPUT_DIR_$(1))/libuv/Makefile
223218

@@ -253,16 +248,6 @@ $$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1))
253248
V=$$(VERBOSE)
254249
endif
255250

256-
$$(JEMALLOC_LIB_$(1)):
257-
cd $$(RT_OUTPUT_DIR_$(1))/jemalloc; $(S)src/rt/jemalloc/configure \
258-
$$(JEMALLOC_ARGS_$(1)) \
259-
--disable-experimental --build=$(CFG_BUILD_TRIPLE) --host=$(1) \
260-
EXTRA_CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
261-
CC="$$(CC_$(1))" \
262-
CXX="$$(CXX_$(1))" \
263-
AR="$$(AR_$(1))"
264-
$$(Q)$$(MAKE) -C $$(RT_OUTPUT_DIR_$(1))/jemalloc build_lib_static
265-
266251
endef
267252

268253
# Instantiate template for all stages/targets

mk/tests.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ tidy:
265265
| grep '^$(S)src/libuv' -v \
266266
| grep '^$(S)src/gyp' -v \
267267
| grep '^$(S)src/etc' -v \
268-
| grep '^$(S)src/rt/jemalloc' -v \
269268
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
270269

271270
endif

src/rt/jemalloc/COPYING

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)