2009-06-24 10:01:18 +08:00
|
|
|
# Clear out all vpaths, then set just one (default vpath) for the main build
|
|
|
|
# directory.
|
|
|
|
vpath
|
|
|
|
vpath % .
|
|
|
|
|
|
|
|
# Clear the default suffixes, so that built-in rules are not used.
|
|
|
|
.SUFFIXES :
|
|
|
|
|
|
|
|
SHELL := /bin/sh
|
|
|
|
|
|
|
|
CC := @CC@
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
CXX := @CXX@
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
# Configuration parameters.
|
2010-03-04 07:48:20 +08:00
|
|
|
DESTDIR =
|
2010-04-03 04:50:53 +08:00
|
|
|
BINDIR := $(DESTDIR)@BINDIR@
|
2010-03-04 07:48:20 +08:00
|
|
|
INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@
|
|
|
|
LIBDIR := $(DESTDIR)@LIBDIR@
|
2010-11-25 14:00:02 +08:00
|
|
|
DATADIR := $(DESTDIR)@DATADIR@
|
2010-03-04 07:48:20 +08:00
|
|
|
MANDIR := $(DESTDIR)@MANDIR@
|
2012-04-16 22:30:22 +08:00
|
|
|
srcroot := @srcroot@
|
|
|
|
objroot := @objroot@
|
|
|
|
abs_srcroot := @abs_srcroot@
|
|
|
|
abs_objroot := @abs_objroot@
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
# Build parameters.
|
2018-05-05 20:50:30 +08:00
|
|
|
CPPFLAGS := @CPPFLAGS@ -I$(objroot)include -I$(srcroot)include
|
2016-12-16 23:18:55 +08:00
|
|
|
CONFIGURE_CFLAGS := @CONFIGURE_CFLAGS@
|
|
|
|
SPECIFIED_CFLAGS := @SPECIFIED_CFLAGS@
|
2016-10-30 13:14:55 +08:00
|
|
|
EXTRA_CFLAGS := @EXTRA_CFLAGS@
|
2016-12-16 23:18:55 +08:00
|
|
|
CFLAGS := $(strip $(CONFIGURE_CFLAGS) $(SPECIFIED_CFLAGS) $(EXTRA_CFLAGS))
|
|
|
|
CONFIGURE_CXXFLAGS := @CONFIGURE_CXXFLAGS@
|
|
|
|
SPECIFIED_CXXFLAGS := @SPECIFIED_CXXFLAGS@
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
EXTRA_CXXFLAGS := @EXTRA_CXXFLAGS@
|
2016-12-16 23:18:55 +08:00
|
|
|
CXXFLAGS := $(strip $(CONFIGURE_CXXFLAGS) $(SPECIFIED_CXXFLAGS) $(EXTRA_CXXFLAGS))
|
2009-06-24 10:01:18 +08:00
|
|
|
LDFLAGS := @LDFLAGS@
|
2012-04-30 18:38:31 +08:00
|
|
|
EXTRA_LDFLAGS := @EXTRA_LDFLAGS@
|
2009-06-24 10:01:18 +08:00
|
|
|
LIBS := @LIBS@
|
|
|
|
RPATH_EXTRA := @RPATH_EXTRA@
|
2011-11-02 13:27:41 +08:00
|
|
|
SO := @so@
|
2012-04-30 18:38:31 +08:00
|
|
|
IMPORTLIB := @importlib@
|
2012-04-16 22:30:24 +08:00
|
|
|
O := @o@
|
|
|
|
A := @a@
|
|
|
|
EXE := @exe@
|
2012-04-22 12:27:46 +08:00
|
|
|
LIBPREFIX := @libprefix@
|
2011-11-02 13:27:41 +08:00
|
|
|
REV := @rev@
|
2012-04-16 22:30:22 +08:00
|
|
|
install_suffix := @install_suffix@
|
|
|
|
ABI := @abi@
|
|
|
|
XSLTPROC := @XSLTPROC@
|
2019-02-08 10:47:49 +08:00
|
|
|
XSLROOT := @XSLROOT@
|
2012-04-16 22:30:22 +08:00
|
|
|
AUTOCONF := @AUTOCONF@
|
2012-04-16 22:30:25 +08:00
|
|
|
_RPATH = @RPATH@
|
|
|
|
RPATH = $(if $(1),$(call _RPATH,$(1)))
|
2014-07-30 17:16:13 +08:00
|
|
|
cfghdrs_in := $(addprefix $(srcroot),@cfghdrs_in@)
|
2012-04-16 22:30:22 +08:00
|
|
|
cfghdrs_out := @cfghdrs_out@
|
2014-07-30 17:16:13 +08:00
|
|
|
cfgoutputs_in := $(addprefix $(srcroot),@cfgoutputs_in@)
|
2012-04-16 22:30:22 +08:00
|
|
|
cfgoutputs_out := @cfgoutputs_out@
|
|
|
|
enable_autogen := @enable_autogen@
|
2019-04-19 19:44:18 +08:00
|
|
|
enable_doc := @enable_doc@
|
2018-12-15 04:28:34 +08:00
|
|
|
enable_shared := @enable_shared@
|
|
|
|
enable_static := @enable_static@
|
2015-06-24 09:47:07 +08:00
|
|
|
enable_prof := @enable_prof@
|
2012-11-27 01:52:41 +08:00
|
|
|
enable_zone_allocator := @enable_zone_allocator@
|
2018-07-11 21:04:48 +08:00
|
|
|
enable_experimental_smallocx := @enable_experimental_smallocx@
|
2015-06-24 09:47:07 +08:00
|
|
|
MALLOC_CONF := @JEMALLOC_CPREFIX@MALLOC_CONF
|
2016-10-28 08:10:56 +08:00
|
|
|
link_whole_archive := @link_whole_archive@
|
2012-04-16 22:30:25 +08:00
|
|
|
DSO_LDFLAGS = @DSO_LDFLAGS@
|
2012-04-19 00:29:40 +08:00
|
|
|
SOREV = @SOREV@
|
2012-04-19 00:29:41 +08:00
|
|
|
PIC_CFLAGS = @PIC_CFLAGS@
|
2012-04-30 18:38:31 +08:00
|
|
|
CTARGET = @CTARGET@
|
|
|
|
LDTARGET = @LDTARGET@
|
2016-06-15 04:18:08 +08:00
|
|
|
TEST_LD_MODE = @TEST_LD_MODE@
|
2012-04-30 18:38:31 +08:00
|
|
|
MKLIB = @MKLIB@
|
2013-08-11 22:44:59 +08:00
|
|
|
AR = @AR@
|
2013-08-20 18:48:19 +08:00
|
|
|
ARFLAGS = @ARFLAGS@
|
2017-05-05 02:20:43 +08:00
|
|
|
DUMP_SYMS = @DUMP_SYMS@
|
|
|
|
AWK := @AWK@
|
2012-05-03 03:30:51 +08:00
|
|
|
CC_MM = @CC_MM@
|
2016-10-28 12:23:48 +08:00
|
|
|
LM := @LM@
|
2016-09-07 14:34:17 +08:00
|
|
|
INSTALL = @INSTALL@
|
2012-04-16 22:30:22 +08:00
|
|
|
|
|
|
|
ifeq (macho, $(ABI))
|
2012-04-22 12:27:46 +08:00
|
|
|
TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(objroot)lib"
|
|
|
|
else
|
|
|
|
ifeq (pecoff, $(ABI))
|
|
|
|
TEST_LIBRARY_PATH := PATH="$(PATH):$(objroot)lib"
|
2010-09-06 01:35:13 +08:00
|
|
|
else
|
|
|
|
TEST_LIBRARY_PATH :=
|
|
|
|
endif
|
2012-04-22 12:27:46 +08:00
|
|
|
endif
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-22 12:27:46 +08:00
|
|
|
LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
|
2012-04-16 22:30:24 +08:00
|
|
|
|
2010-01-17 17:49:20 +08:00
|
|
|
# Lists of files.
|
2015-05-02 03:31:12 +08:00
|
|
|
BINS := $(objroot)bin/jemalloc-config $(objroot)bin/jemalloc.sh $(objroot)bin/jeprof
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
C_HDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h
|
2016-02-22 03:25:02 +08:00
|
|
|
C_SRCS := $(srcroot)src/jemalloc.c \
|
|
|
|
$(srcroot)src/arena.c \
|
2017-03-18 03:42:33 +08:00
|
|
|
$(srcroot)src/background_thread.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/base.c \
|
2017-10-02 08:22:06 +08:00
|
|
|
$(srcroot)src/bin.c \
|
2019-09-21 07:18:41 +08:00
|
|
|
$(srcroot)src/bin_info.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/bitmap.c \
|
2020-01-10 08:36:09 +08:00
|
|
|
$(srcroot)src/buf_writer.c \
|
2020-02-26 04:14:48 +08:00
|
|
|
$(srcroot)src/cache_bin.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/ckh.c \
|
2020-01-24 05:18:04 +08:00
|
|
|
$(srcroot)src/counter.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/ctl.c \
|
2020-03-10 05:52:25 +08:00
|
|
|
$(srcroot)src/decay.c \
|
2017-12-20 09:30:50 +08:00
|
|
|
$(srcroot)src/div.c \
|
2019-12-13 08:25:24 +08:00
|
|
|
$(srcroot)src/ecache.c \
|
2019-12-10 02:41:25 +08:00
|
|
|
$(srcroot)src/edata.c \
|
2019-12-12 03:17:19 +08:00
|
|
|
$(srcroot)src/edata_cache.c \
|
2019-12-03 02:44:09 +08:00
|
|
|
$(srcroot)src/ehooks.c \
|
2020-01-28 05:55:46 +08:00
|
|
|
$(srcroot)src/emap.c \
|
2019-09-21 11:17:23 +08:00
|
|
|
$(srcroot)src/eset.c \
|
2020-11-07 06:38:17 +08:00
|
|
|
$(srcroot)src/exp_grow.c \
|
2019-12-17 03:05:07 +08:00
|
|
|
$(srcroot)src/extent.c \
|
2016-06-02 03:59:02 +08:00
|
|
|
$(srcroot)src/extent_dss.c \
|
|
|
|
$(srcroot)src/extent_mmap.c \
|
2020-12-02 05:00:57 +08:00
|
|
|
$(srcroot)src/fxp.c \
|
2018-04-10 10:11:46 +08:00
|
|
|
$(srcroot)src/hook.c \
|
2020-08-15 04:36:41 +08:00
|
|
|
$(srcroot)src/hpa.c \
|
2020-08-08 08:47:13 +08:00
|
|
|
$(srcroot)src/hpa_central.c \
|
2020-11-18 08:32:45 +08:00
|
|
|
$(srcroot)src/hpdata.c \
|
2019-12-05 01:44:59 +08:00
|
|
|
$(srcroot)src/inspect.c \
|
2016-06-01 05:50:21 +08:00
|
|
|
$(srcroot)src/large.c \
|
2017-07-20 07:36:46 +08:00
|
|
|
$(srcroot)src/log.c \
|
2017-03-04 02:10:08 +08:00
|
|
|
$(srcroot)src/malloc_io.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/mutex.c \
|
|
|
|
$(srcroot)src/nstime.c \
|
2020-03-08 12:14:49 +08:00
|
|
|
$(srcroot)src/pa.c \
|
2020-03-13 00:20:37 +08:00
|
|
|
$(srcroot)src/pa_extra.c \
|
2021-01-05 10:40:27 +08:00
|
|
|
$(srcroot)src/pai.c \
|
2020-05-30 08:32:37 +08:00
|
|
|
$(srcroot)src/pac.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/pages.c \
|
2020-05-28 05:31:00 +08:00
|
|
|
$(srcroot)src/peak_event.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/prof.c \
|
2019-07-18 06:52:50 +08:00
|
|
|
$(srcroot)src/prof_data.c \
|
2019-07-13 07:37:37 +08:00
|
|
|
$(srcroot)src/prof_log.c \
|
2019-12-19 05:38:14 +08:00
|
|
|
$(srcroot)src/prof_recent.c \
|
2020-12-19 09:14:59 +08:00
|
|
|
$(srcroot)src/prof_stats.c \
|
2020-04-01 00:02:55 +08:00
|
|
|
$(srcroot)src/prof_sys.c \
|
2020-07-11 08:40:13 +08:00
|
|
|
$(srcroot)src/psset.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/rtree.c \
|
2019-03-21 04:06:53 +08:00
|
|
|
$(srcroot)src/safety_check.c \
|
2017-12-15 04:46:39 +08:00
|
|
|
$(srcroot)src/sc.c \
|
2020-10-16 04:46:38 +08:00
|
|
|
$(srcroot)src/sec.c \
|
2019-09-04 06:04:48 +08:00
|
|
|
$(srcroot)src/stats.c \
|
2017-05-31 01:45:37 +08:00
|
|
|
$(srcroot)src/sz.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/tcache.c \
|
2018-04-10 09:09:34 +08:00
|
|
|
$(srcroot)src/test_hooks.c \
|
2019-09-04 06:04:48 +08:00
|
|
|
$(srcroot)src/thread_event.c \
|
2021-02-01 03:55:45 +08:00
|
|
|
$(srcroot)src/ticker.c \
|
2016-02-22 03:25:02 +08:00
|
|
|
$(srcroot)src/tsd.c \
|
2016-04-14 14:36:15 +08:00
|
|
|
$(srcroot)src/witness.c
|
2012-11-27 01:52:41 +08:00
|
|
|
ifeq ($(enable_zone_allocator), 1)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
C_SRCS += $(srcroot)src/zone.c
|
2010-09-06 01:35:13 +08:00
|
|
|
endif
|
2012-04-30 18:38:31 +08:00
|
|
|
ifeq ($(IMPORTLIB),$(SO))
|
2012-04-16 22:30:24 +08:00
|
|
|
STATIC_LIBS := $(objroot)lib/$(LIBJEMALLOC).$(A)
|
2012-04-30 18:38:31 +08:00
|
|
|
endif
|
2012-04-19 00:29:41 +08:00
|
|
|
ifdef PIC_CFLAGS
|
|
|
|
STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_pic.$(A)
|
2012-04-30 18:38:31 +08:00
|
|
|
else
|
|
|
|
STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_s.$(A)
|
2012-04-19 00:29:41 +08:00
|
|
|
endif
|
|
|
|
DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV)
|
2012-04-19 00:29:40 +08:00
|
|
|
ifneq ($(SOREV),$(SO))
|
|
|
|
DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO)
|
|
|
|
endif
|
2016-10-28 08:10:56 +08:00
|
|
|
ifeq (1, $(link_whole_archive))
|
2016-10-26 12:52:36 +08:00
|
|
|
LJEMALLOC := -Wl,--whole-archive -L$(objroot)lib -l$(LIBJEMALLOC) -Wl,--no-whole-archive
|
|
|
|
else
|
|
|
|
LJEMALLOC := $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
|
|
|
endif
|
2014-10-04 15:35:07 +08:00
|
|
|
PC := $(objroot)jemalloc.pc
|
2012-04-16 22:30:22 +08:00
|
|
|
MAN3 := $(objroot)doc/jemalloc$(install_suffix).3
|
|
|
|
DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml
|
2014-12-24 06:09:32 +08:00
|
|
|
DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.html)
|
|
|
|
DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.3)
|
2010-11-25 14:00:02 +08:00
|
|
|
DOCS := $(DOCS_HTML) $(DOCS_MAN3)
|
2014-10-02 08:51:52 +08:00
|
|
|
C_TESTLIB_SRCS := $(srcroot)test/src/btalloc.c $(srcroot)test/src/btalloc_0.c \
|
|
|
|
$(srcroot)test/src/btalloc_1.c $(srcroot)test/src/math.c \
|
2020-01-15 23:25:59 +08:00
|
|
|
$(srcroot)test/src/mtx.c $(srcroot)test/src/sleep.c \
|
2015-07-22 07:45:35 +08:00
|
|
|
$(srcroot)test/src/SFMT.c $(srcroot)test/src/test.c \
|
|
|
|
$(srcroot)test/src/thd.c $(srcroot)test/src/timer.c
|
2016-10-28 08:10:56 +08:00
|
|
|
ifeq (1, $(link_whole_archive))
|
2016-10-26 12:52:36 +08:00
|
|
|
C_UTIL_INTEGRATION_SRCS :=
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
C_UTIL_CPP_SRCS :=
|
2016-10-26 12:52:36 +08:00
|
|
|
else
|
2021-02-01 03:55:45 +08:00
|
|
|
C_UTIL_INTEGRATION_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c \
|
|
|
|
$(srcroot)src/ticker.c
|
2017-03-04 02:10:08 +08:00
|
|
|
C_UTIL_CPP_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c
|
2016-10-26 12:52:36 +08:00
|
|
|
endif
|
2016-04-23 05:37:17 +08:00
|
|
|
TESTS_UNIT := \
|
2016-05-08 03:42:31 +08:00
|
|
|
$(srcroot)test/unit/a0.c \
|
2020-03-10 23:46:47 +08:00
|
|
|
$(srcroot)test/unit/arena_decay.c \
|
2016-04-23 05:37:17 +08:00
|
|
|
$(srcroot)test/unit/arena_reset.c \
|
|
|
|
$(srcroot)test/unit/atomic.c \
|
2017-05-16 08:44:13 +08:00
|
|
|
$(srcroot)test/unit/background_thread.c \
|
2018-02-27 09:11:29 +08:00
|
|
|
$(srcroot)test/unit/background_thread_enable.c \
|
2016-12-23 06:39:10 +08:00
|
|
|
$(srcroot)test/unit/base.c \
|
2020-04-24 06:46:45 +08:00
|
|
|
$(srcroot)test/unit/batch_alloc.c \
|
2019-09-04 06:04:48 +08:00
|
|
|
$(srcroot)test/unit/binshard.c \
|
2014-08-07 14:36:19 +08:00
|
|
|
$(srcroot)test/unit/bitmap.c \
|
2017-12-23 07:14:44 +08:00
|
|
|
$(srcroot)test/unit/bit_util.c \
|
2019-06-08 05:04:59 +08:00
|
|
|
$(srcroot)test/unit/buf_writer.c \
|
2019-08-10 13:12:47 +08:00
|
|
|
$(srcroot)test/unit/cache_bin.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/ckh.c \
|
2020-01-14 14:29:17 +08:00
|
|
|
$(srcroot)test/unit/counter.c \
|
2020-03-11 01:19:38 +08:00
|
|
|
$(srcroot)test/unit/decay.c \
|
2017-12-20 09:30:50 +08:00
|
|
|
$(srcroot)test/unit/div.c \
|
2020-10-15 07:45:19 +08:00
|
|
|
$(srcroot)test/unit/double_free.c \
|
2020-02-19 08:09:10 +08:00
|
|
|
$(srcroot)test/unit/edata_cache.c \
|
2018-03-02 07:48:46 +08:00
|
|
|
$(srcroot)test/unit/emitter.c \
|
2016-05-18 05:58:56 +08:00
|
|
|
$(srcroot)test/unit/extent_quantize.c \
|
2021-02-18 08:23:24 +08:00
|
|
|
${srcroot}test/unit/fb.c \
|
2016-04-26 14:14:40 +08:00
|
|
|
$(srcroot)test/unit/fork.c \
|
2020-12-02 05:00:57 +08:00
|
|
|
${srcroot}test/unit/fxp.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/hash.c \
|
2018-04-10 10:11:46 +08:00
|
|
|
$(srcroot)test/unit/hook.c \
|
2020-08-15 04:36:41 +08:00
|
|
|
$(srcroot)test/unit/hpa.c \
|
2020-08-08 08:47:13 +08:00
|
|
|
$(srcroot)test/unit/hpa_central.c \
|
2020-12-02 23:04:01 +08:00
|
|
|
$(srcroot)test/unit/hpdata.c \
|
2018-06-02 06:58:31 +08:00
|
|
|
$(srcroot)test/unit/huge.c \
|
2019-12-05 01:44:59 +08:00
|
|
|
$(srcroot)test/unit/inspect.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/junk.c \
|
2014-12-09 05:12:41 +08:00
|
|
|
$(srcroot)test/unit/junk_alloc.c \
|
|
|
|
$(srcroot)test/unit/junk_free.c \
|
2017-07-20 07:36:46 +08:00
|
|
|
$(srcroot)test/unit/log.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/mallctl.c \
|
2020-03-30 01:41:23 +08:00
|
|
|
$(srcroot)test/unit/malloc_conf_2.c \
|
2017-03-04 02:10:08 +08:00
|
|
|
$(srcroot)test/unit/malloc_io.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/math.c \
|
|
|
|
$(srcroot)test/unit/mq.c \
|
|
|
|
$(srcroot)test/unit/mtx.c \
|
2019-09-04 06:04:48 +08:00
|
|
|
$(srcroot)test/unit/nstime.c \
|
2020-11-12 05:34:43 +08:00
|
|
|
$(srcroot)test/unit/oversize_threshold.c \
|
2020-03-19 03:04:02 +08:00
|
|
|
$(srcroot)test/unit/pa.c \
|
2016-11-15 15:29:21 +08:00
|
|
|
$(srcroot)test/unit/pack.c \
|
2016-11-18 05:36:17 +08:00
|
|
|
$(srcroot)test/unit/pages.c \
|
2020-05-28 05:30:28 +08:00
|
|
|
$(srcroot)test/unit/peak.c \
|
2016-03-01 03:30:34 +08:00
|
|
|
$(srcroot)test/unit/ph.c \
|
2016-02-10 08:28:40 +08:00
|
|
|
$(srcroot)test/unit/prng.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/prof_accum.c \
|
2014-10-04 14:25:30 +08:00
|
|
|
$(srcroot)test/unit/prof_active.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/prof_gdump.c \
|
|
|
|
$(srcroot)test/unit/prof_idump.c \
|
2018-07-04 02:10:09 +08:00
|
|
|
$(srcroot)test/unit/prof_log.c \
|
2020-04-01 01:00:37 +08:00
|
|
|
$(srcroot)test/unit/prof_mdump.c \
|
2019-12-19 05:38:14 +08:00
|
|
|
$(srcroot)test/unit/prof_recent.c \
|
2014-10-02 08:51:52 +08:00
|
|
|
$(srcroot)test/unit/prof_reset.c \
|
2020-12-19 09:14:59 +08:00
|
|
|
$(srcroot)test/unit/prof_stats.c \
|
2017-01-17 03:09:24 +08:00
|
|
|
$(srcroot)test/unit/prof_tctx.c \
|
2014-10-04 14:25:30 +08:00
|
|
|
$(srcroot)test/unit/prof_thread_name.c \
|
2020-06-20 06:16:53 +08:00
|
|
|
$(srcroot)test/unit/prof_sys_thread_name.c \
|
2020-07-11 08:40:13 +08:00
|
|
|
$(srcroot)test/unit/psset.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/ql.c \
|
|
|
|
$(srcroot)test/unit/qr.c \
|
|
|
|
$(srcroot)test/unit/rb.c \
|
2017-05-27 00:52:33 +08:00
|
|
|
$(srcroot)test/unit/retained.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/rtree.c \
|
2019-03-23 03:53:11 +08:00
|
|
|
$(srcroot)test/unit/safety_check.c \
|
2019-09-04 06:04:48 +08:00
|
|
|
$(srcroot)test/unit/sc.c \
|
2020-10-16 04:46:38 +08:00
|
|
|
$(srcroot)test/unit/sec.c \
|
2018-04-14 06:56:59 +08:00
|
|
|
$(srcroot)test/unit/seq.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/SFMT.c \
|
2020-08-04 09:23:36 +08:00
|
|
|
$(srcroot)test/unit/size_check.c \
|
2015-07-10 12:36:33 +08:00
|
|
|
$(srcroot)test/unit/size_classes.c \
|
2016-12-22 04:33:17 +08:00
|
|
|
$(srcroot)test/unit/slab.c \
|
2016-02-06 16:46:19 +08:00
|
|
|
$(srcroot)test/unit/smoothstep.c \
|
2017-02-09 02:30:44 +08:00
|
|
|
$(srcroot)test/unit/spin.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/stats.c \
|
2017-01-18 17:01:19 +08:00
|
|
|
$(srcroot)test/unit/stats_print.c \
|
2020-10-22 10:47:57 +08:00
|
|
|
$(srcroot)test/unit/tcache_max.c \
|
2018-04-10 09:09:34 +08:00
|
|
|
$(srcroot)test/unit/test_hooks.c \
|
2019-09-04 06:04:48 +08:00
|
|
|
$(srcroot)test/unit/thread_event.c \
|
2016-02-03 12:27:54 +08:00
|
|
|
$(srcroot)test/unit/ticker.c \
|
2014-01-18 07:40:52 +08:00
|
|
|
$(srcroot)test/unit/tsd.c \
|
2016-04-14 14:36:15 +08:00
|
|
|
$(srcroot)test/unit/witness.c \
|
2019-09-24 08:56:19 +08:00
|
|
|
$(srcroot)test/unit/zero.c \
|
|
|
|
$(srcroot)test/unit/zero_realloc_abort.c \
|
|
|
|
$(srcroot)test/unit/zero_realloc_free.c \
|
2019-10-27 02:04:46 +08:00
|
|
|
$(srcroot)test/unit/zero_realloc_strict.c \
|
|
|
|
$(srcroot)test/unit/zero_reallocs.c
|
2017-01-04 09:21:59 +08:00
|
|
|
ifeq (@enable_prof@, 1)
|
|
|
|
TESTS_UNIT += \
|
2020-04-24 06:46:45 +08:00
|
|
|
$(srcroot)test/unit/arena_reset_prof.c \
|
|
|
|
$(srcroot)test/unit/batch_alloc_prof.c
|
2017-01-04 09:21:59 +08:00
|
|
|
endif
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \
|
|
|
|
$(srcroot)test/integration/allocated.c \
|
2016-06-02 03:59:02 +08:00
|
|
|
$(srcroot)test/integration/extent.c \
|
2018-10-09 23:41:36 +08:00
|
|
|
$(srcroot)test/integration/malloc.c \
|
Implement the *allocx() API.
Implement the *allocx() API, which is a successor to the *allocm() API.
The *allocx() functions are slightly simpler to use because they have
fewer parameters, they directly return the results of primary interest,
and mallocx()/rallocx() avoid the strict aliasing pitfall that
allocm()/rallocx() share with posix_memalign(). The following code
violates strict aliasing rules:
foo_t *foo;
allocm((void **)&foo, NULL, 42, 0);
whereas the following is safe:
foo_t *foo;
void *p;
allocm(&p, NULL, 42, 0);
foo = (foo_t *)p;
mallocx() does not have this problem:
foo_t *foo = (foo_t *)mallocx(42, 0);
2013-12-13 14:35:52 +08:00
|
|
|
$(srcroot)test/integration/mallocx.c \
|
2014-04-15 13:32:31 +08:00
|
|
|
$(srcroot)test/integration/MALLOCX_ARENA.c \
|
2015-06-24 09:47:07 +08:00
|
|
|
$(srcroot)test/integration/overflow.c \
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(srcroot)test/integration/posix_memalign.c \
|
Implement the *allocx() API.
Implement the *allocx() API, which is a successor to the *allocm() API.
The *allocx() functions are slightly simpler to use because they have
fewer parameters, they directly return the results of primary interest,
and mallocx()/rallocx() avoid the strict aliasing pitfall that
allocm()/rallocx() share with posix_memalign(). The following code
violates strict aliasing rules:
foo_t *foo;
allocm((void **)&foo, NULL, 42, 0);
whereas the following is safe:
foo_t *foo;
void *p;
allocm(&p, NULL, 42, 0);
foo = (foo_t *)p;
mallocx() does not have this problem:
foo_t *foo = (foo_t *)mallocx(42, 0);
2013-12-13 14:35:52 +08:00
|
|
|
$(srcroot)test/integration/rallocx.c \
|
2016-06-02 03:59:02 +08:00
|
|
|
$(srcroot)test/integration/sdallocx.c \
|
2018-04-21 12:11:03 +08:00
|
|
|
$(srcroot)test/integration/slab_sizes.c \
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(srcroot)test/integration/thread_arena.c \
|
Implement the *allocx() API.
Implement the *allocx() API, which is a successor to the *allocm() API.
The *allocx() functions are slightly simpler to use because they have
fewer parameters, they directly return the results of primary interest,
and mallocx()/rallocx() avoid the strict aliasing pitfall that
allocm()/rallocx() share with posix_memalign(). The following code
violates strict aliasing rules:
foo_t *foo;
allocm((void **)&foo, NULL, 42, 0);
whereas the following is safe:
foo_t *foo;
void *p;
allocm(&p, NULL, 42, 0);
foo = (foo_t *)p;
mallocx() does not have this problem:
foo_t *foo = (foo_t *)mallocx(42, 0);
2013-12-13 14:35:52 +08:00
|
|
|
$(srcroot)test/integration/thread_tcache_enabled.c \
|
2016-06-02 03:59:02 +08:00
|
|
|
$(srcroot)test/integration/xallocx.c
|
2018-07-11 21:04:48 +08:00
|
|
|
ifeq (@enable_experimental_smallocx@, 1)
|
|
|
|
TESTS_INTEGRATION += \
|
|
|
|
$(srcroot)test/integration/smallocx.c
|
|
|
|
endif
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
ifeq (@enable_cxx@, 1)
|
|
|
|
CPP_SRCS := $(srcroot)src/jemalloc_cpp.cpp
|
|
|
|
TESTS_INTEGRATION_CPP := $(srcroot)test/integration/cpp/basic.cpp
|
|
|
|
else
|
|
|
|
CPP_SRCS :=
|
|
|
|
TESTS_INTEGRATION_CPP :=
|
|
|
|
endif
|
2020-08-06 07:27:50 +08:00
|
|
|
TESTS_ANALYZE := $(srcroot)test/analyze/prof_bias.c \
|
|
|
|
$(srcroot)test/analyze/rand.c \
|
|
|
|
$(srcroot)test/analyze/sizes.c
|
|
|
|
TESTS_STRESS := $(srcroot)test/stress/batch_alloc.c \
|
2020-05-12 04:05:36 +08:00
|
|
|
$(srcroot)test/stress/fill_flush.c \
|
2020-08-01 06:56:38 +08:00
|
|
|
$(srcroot)test/stress/hookbench.c \
|
2020-08-06 07:27:50 +08:00
|
|
|
$(srcroot)test/stress/large_microbench.c \
|
2020-08-06 07:57:09 +08:00
|
|
|
$(srcroot)test/stress/mallctl.c \
|
2020-08-06 07:27:50 +08:00
|
|
|
$(srcroot)test/stress/microbench.c
|
2018-08-02 05:22:05 +08:00
|
|
|
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
|
2020-05-05 05:58:25 +08:00
|
|
|
TESTS := $(TESTS_UNIT) $(TESTS_INTEGRATION) $(TESTS_INTEGRATION_CPP) \
|
|
|
|
$(TESTS_ANALYZE) $(TESTS_STRESS)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
|
2017-05-05 02:20:43 +08:00
|
|
|
PRIVATE_NAMESPACE_HDRS := $(objroot)include/jemalloc/internal/private_namespace.h $(objroot)include/jemalloc/internal/private_namespace_jet.h
|
2017-05-17 14:12:59 +08:00
|
|
|
PRIVATE_NAMESPACE_GEN_HDRS := $(PRIVATE_NAMESPACE_HDRS:%.h=%.gen.h)
|
2017-05-05 02:20:43 +08:00
|
|
|
C_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym.$(O))
|
|
|
|
C_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
C_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.$(O))
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
CPP_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.$(O))
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
C_PIC_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.pic.$(O))
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
CPP_PIC_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.pic.$(O))
|
2017-05-05 02:20:43 +08:00
|
|
|
C_JET_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym.$(O))
|
|
|
|
C_JET_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
C_JET_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.$(O))
|
|
|
|
C_TESTLIB_UNIT_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.unit.$(O))
|
|
|
|
C_TESTLIB_INTEGRATION_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
|
|
|
|
C_UTIL_INTEGRATION_OBJS := $(C_UTIL_INTEGRATION_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
|
2020-05-05 05:58:25 +08:00
|
|
|
C_TESTLIB_ANALYZE_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.analyze.$(O))
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
C_TESTLIB_STRESS_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.stress.$(O))
|
2020-05-05 05:58:25 +08:00
|
|
|
C_TESTLIB_OBJS := $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) \
|
|
|
|
$(C_UTIL_INTEGRATION_OBJS) $(C_TESTLIB_ANALYZE_OBJS) \
|
|
|
|
$(C_TESTLIB_STRESS_OBJS)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
|
|
|
|
TESTS_UNIT_OBJS := $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%.$(O))
|
|
|
|
TESTS_INTEGRATION_OBJS := $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%.$(O))
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
TESTS_INTEGRATION_CPP_OBJS := $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%.$(O))
|
2020-05-05 05:58:25 +08:00
|
|
|
TESTS_ANALYZE_OBJS := $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%.$(O))
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
TESTS_STRESS_OBJS := $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%.$(O))
|
2020-05-05 05:58:25 +08:00
|
|
|
TESTS_OBJS := $(TESTS_UNIT_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_ANALYZE_OBJS) \
|
|
|
|
$(TESTS_STRESS_OBJS)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
TESTS_CPP_OBJS := $(TESTS_INTEGRATION_CPP_OBJS)
|
2012-04-19 00:29:41 +08:00
|
|
|
|
2013-01-23 04:55:42 +08:00
|
|
|
.PHONY: all dist build_doc_html build_doc_man build_doc
|
2010-11-25 14:00:02 +08:00
|
|
|
.PHONY: install_bin install_include install_lib
|
2013-01-23 04:55:42 +08:00
|
|
|
.PHONY: install_doc_html install_doc_man install_doc install
|
2010-11-25 14:00:02 +08:00
|
|
|
.PHONY: tests check clean distclean relclean
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2017-05-17 14:12:59 +08:00
|
|
|
.SECONDARY : $(PRIVATE_NAMESPACE_GEN_HDRS) $(TESTS_OBJS) $(TESTS_CPP_OBJS)
|
2011-02-14 10:11:54 +08:00
|
|
|
|
2009-06-24 10:01:18 +08:00
|
|
|
# Default target.
|
2013-12-04 14:28:10 +08:00
|
|
|
all: build_lib
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
dist: build_doc
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2014-12-24 06:09:32 +08:00
|
|
|
$(objroot)doc/%.html : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/html.xsl
|
2019-02-08 10:47:49 +08:00
|
|
|
ifneq ($(XSLROOT),)
|
2012-04-16 22:30:22 +08:00
|
|
|
$(XSLTPROC) -o $@ $(objroot)doc/html.xsl $<
|
2019-02-08 10:47:49 +08:00
|
|
|
else
|
|
|
|
ifeq ($(wildcard $(DOCS_HTML)),)
|
|
|
|
@echo "<p>Missing xsltproc. Doc not built.</p>" > $@
|
|
|
|
endif
|
|
|
|
@echo "Missing xsltproc. "$@" not (re)built."
|
|
|
|
endif
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2014-12-24 06:09:32 +08:00
|
|
|
$(objroot)doc/%.3 : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/manpages.xsl
|
2019-02-08 10:47:49 +08:00
|
|
|
ifneq ($(XSLROOT),)
|
2012-04-16 22:30:22 +08:00
|
|
|
$(XSLTPROC) -o $@ $(objroot)doc/manpages.xsl $<
|
2019-02-08 10:47:49 +08:00
|
|
|
else
|
|
|
|
ifeq ($(wildcard $(DOCS_MAN3)),)
|
|
|
|
@echo "Missing xsltproc. Doc not built." > $@
|
|
|
|
endif
|
|
|
|
@echo "Missing xsltproc. "$@" not (re)built."
|
|
|
|
endif
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
build_doc_html: $(DOCS_HTML)
|
|
|
|
build_doc_man: $(DOCS_MAN3)
|
|
|
|
build_doc: $(DOCS)
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2010-01-17 01:53:50 +08:00
|
|
|
#
|
|
|
|
# Include generated dependency files.
|
|
|
|
#
|
2012-05-03 03:30:51 +08:00
|
|
|
ifdef CC_MM
|
2017-05-05 02:20:43 +08:00
|
|
|
-include $(C_SYM_OBJS:%.$(O)=%.d)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
-include $(C_OBJS:%.$(O)=%.d)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
-include $(CPP_OBJS:%.$(O)=%.d)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
-include $(C_PIC_OBJS:%.$(O)=%.d)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
-include $(CPP_PIC_OBJS:%.$(O)=%.d)
|
2017-05-05 02:20:43 +08:00
|
|
|
-include $(C_JET_SYM_OBJS:%.$(O)=%.d)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
-include $(C_JET_OBJS:%.$(O)=%.d)
|
2013-12-10 15:36:37 +08:00
|
|
|
-include $(C_TESTLIB_OBJS:%.$(O)=%.d)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
-include $(TESTS_OBJS:%.$(O)=%.d)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
-include $(TESTS_CPP_OBJS:%.$(O)=%.d)
|
2012-05-03 03:30:51 +08:00
|
|
|
endif
|
2010-01-17 01:53:50 +08:00
|
|
|
|
2017-05-05 02:20:43 +08:00
|
|
|
$(C_SYM_OBJS): $(objroot)src/%.sym.$(O): $(srcroot)src/%.c
|
|
|
|
$(C_SYM_OBJS): CPPFLAGS += -DJEMALLOC_NO_PRIVATE_NAMESPACE
|
|
|
|
$(C_SYMS): $(objroot)src/%.sym: $(objroot)src/%.sym.$(O)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(C_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.c
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(CPP_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.cpp
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(C_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.c
|
|
|
|
$(C_PIC_OBJS): CFLAGS += $(PIC_CFLAGS)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(CPP_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.cpp
|
|
|
|
$(CPP_PIC_OBJS): CXXFLAGS += $(PIC_CFLAGS)
|
2017-05-05 02:20:43 +08:00
|
|
|
$(C_JET_SYM_OBJS): $(objroot)src/%.jet.sym.$(O): $(srcroot)src/%.c
|
|
|
|
$(C_JET_SYM_OBJS): CPPFLAGS += -DJEMALLOC_JET -DJEMALLOC_NO_PRIVATE_NAMESPACE
|
|
|
|
$(C_JET_SYMS): $(objroot)src/%.jet.sym: $(objroot)src/%.jet.sym.$(O)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(C_JET_OBJS): $(objroot)src/%.jet.$(O): $(srcroot)src/%.c
|
2017-05-05 02:20:43 +08:00
|
|
|
$(C_JET_OBJS): CPPFLAGS += -DJEMALLOC_JET
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(C_TESTLIB_UNIT_OBJS): $(objroot)test/src/%.unit.$(O): $(srcroot)test/src/%.c
|
|
|
|
$(C_TESTLIB_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
|
|
|
|
$(C_TESTLIB_INTEGRATION_OBJS): $(objroot)test/src/%.integration.$(O): $(srcroot)test/src/%.c
|
|
|
|
$(C_TESTLIB_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
|
|
|
|
$(C_UTIL_INTEGRATION_OBJS): $(objroot)src/%.integration.$(O): $(srcroot)src/%.c
|
2020-05-05 05:58:25 +08:00
|
|
|
$(C_TESTLIB_ANALYZE_OBJS): $(objroot)test/src/%.analyze.$(O): $(srcroot)test/src/%.c
|
|
|
|
$(C_TESTLIB_ANALYZE_OBJS): CPPFLAGS += -DJEMALLOC_ANALYZE_TEST
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(C_TESTLIB_STRESS_OBJS): $(objroot)test/src/%.stress.$(O): $(srcroot)test/src/%.c
|
2014-01-17 09:38:01 +08:00
|
|
|
$(C_TESTLIB_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST -DJEMALLOC_STRESS_TESTLIB
|
2013-12-09 12:52:21 +08:00
|
|
|
$(C_TESTLIB_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(TESTS_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
|
|
|
|
$(TESTS_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(TESTS_INTEGRATION_CPP_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_CPP_TEST
|
2020-05-05 05:58:25 +08:00
|
|
|
$(TESTS_ANALYZE_OBJS): CPPFLAGS += -DJEMALLOC_ANALYZE_TEST
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(TESTS_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST
|
|
|
|
$(TESTS_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(TESTS_CPP_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.cpp
|
2013-12-09 12:52:21 +08:00
|
|
|
$(TESTS_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(TESTS_CPP_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
|
2012-04-30 18:38:31 +08:00
|
|
|
ifneq ($(IMPORTLIB),$(SO))
|
2017-05-05 02:20:43 +08:00
|
|
|
$(CPP_OBJS) $(C_SYM_OBJS) $(C_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS): CPPFLAGS += -DDLLEXPORT
|
2012-04-30 18:38:31 +08:00
|
|
|
endif
|
2009-06-24 10:01:18 +08:00
|
|
|
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
# Dependencies.
|
2017-05-05 02:20:43 +08:00
|
|
|
ifndef CC_MM
|
2012-05-03 03:30:51 +08:00
|
|
|
HEADER_DIRS = $(srcroot)include/jemalloc/internal \
|
|
|
|
$(objroot)include/jemalloc $(objroot)include/jemalloc/internal
|
2017-05-05 02:20:43 +08:00
|
|
|
HEADERS = $(filter-out $(PRIVATE_NAMESPACE_HDRS),$(wildcard $(foreach dir,$(HEADER_DIRS),$(dir)/*.h)))
|
|
|
|
$(C_SYM_OBJS) $(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS) $(TESTS_CPP_OBJS): $(HEADERS)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(TESTS_OBJS) $(TESTS_CPP_OBJS): $(objroot)test/include/test/jemalloc_test.h
|
2012-05-03 03:30:51 +08:00
|
|
|
endif
|
|
|
|
|
2017-05-05 02:20:43 +08:00
|
|
|
$(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_INTEGRATION_CPP_OBJS): $(objroot)include/jemalloc/internal/private_namespace.h
|
2020-05-05 05:58:25 +08:00
|
|
|
$(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_ANALYZE_OBJS) $(C_TESTLIB_STRESS_OBJS) $(TESTS_UNIT_OBJS) $(TESTS_ANALYZE_OBJS) $(TESTS_STRESS_OBJS): $(objroot)include/jemalloc/internal/private_namespace_jet.h
|
2017-05-05 02:20:43 +08:00
|
|
|
|
|
|
|
$(C_SYM_OBJS) $(C_OBJS) $(C_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): %.$(O):
|
2011-02-16 06:13:38 +08:00
|
|
|
@mkdir -p $(@D)
|
2012-04-30 18:38:31 +08:00
|
|
|
$(CC) $(CFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
|
2012-05-03 03:30:51 +08:00
|
|
|
ifdef CC_MM
|
2012-04-16 22:30:24 +08:00
|
|
|
@$(CC) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
|
2012-05-03 03:30:51 +08:00
|
|
|
endif
|
2011-02-16 06:13:38 +08:00
|
|
|
|
2017-05-05 02:20:43 +08:00
|
|
|
$(C_SYMS): %.sym:
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
$(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols.awk > $@
|
|
|
|
|
|
|
|
$(C_JET_SYMS): %.sym:
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
$(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols_jet.awk > $@
|
|
|
|
|
2017-05-17 14:12:59 +08:00
|
|
|
$(objroot)include/jemalloc/internal/private_namespace.gen.h: $(C_SYMS)
|
2017-05-16 02:03:14 +08:00
|
|
|
$(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@
|
2017-05-05 02:20:43 +08:00
|
|
|
|
2017-05-17 14:12:59 +08:00
|
|
|
$(objroot)include/jemalloc/internal/private_namespace_jet.gen.h: $(C_JET_SYMS)
|
2017-05-16 02:03:14 +08:00
|
|
|
$(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@
|
2017-05-05 02:20:43 +08:00
|
|
|
|
2017-05-17 14:12:59 +08:00
|
|
|
%.h: %.gen.h
|
2019-11-12 04:13:48 +08:00
|
|
|
@if ! `cmp -s $< $@` ; then echo "cp $< $@"; cp $< $@ ; fi
|
2017-05-17 14:12:59 +08:00
|
|
|
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(CPP_OBJS) $(CPP_PIC_OBJS) $(TESTS_CPP_OBJS): %.$(O):
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
$(CXX) $(CXXFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
|
|
|
|
ifdef CC_MM
|
|
|
|
@$(CXX) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
|
|
|
|
endif
|
|
|
|
|
2012-04-19 00:29:40 +08:00
|
|
|
ifneq ($(SOREV),$(SO))
|
|
|
|
%.$(SO) : %.$(SOREV)
|
2009-06-24 10:01:18 +08:00
|
|
|
@mkdir -p $(@D)
|
2010-04-08 14:37:35 +08:00
|
|
|
ln -sf $(<F) $@
|
2012-04-19 00:29:40 +08:00
|
|
|
endif
|
2010-04-08 14:37:35 +08:00
|
|
|
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(objroot)lib/$(LIBJEMALLOC).$(SOREV) : $(if $(PIC_CFLAGS),$(C_PIC_OBJS),$(C_OBJS)) $(if $(PIC_CFLAGS),$(CPP_PIC_OBJS),$(CPP_OBJS))
|
2010-04-08 14:37:35 +08:00
|
|
|
@mkdir -p $(@D)
|
2012-04-30 18:38:31 +08:00
|
|
|
$(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS)
|
2010-04-08 14:37:35 +08:00
|
|
|
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(C_PIC_OBJS) $(CPP_PIC_OBJS)
|
|
|
|
$(objroot)lib/$(LIBJEMALLOC).$(A) : $(C_OBJS) $(CPP_OBJS)
|
|
|
|
$(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(C_OBJS) $(CPP_OBJS)
|
2011-02-16 06:13:38 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
$(STATIC_LIBS):
|
2010-04-08 14:37:35 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-08-20 18:48:19 +08:00
|
|
|
$(AR) $(ARFLAGS)@AROUT@ $+
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2017-05-05 02:20:43 +08:00
|
|
|
$(objroot)test/unit/%$(EXE): $(objroot)test/unit/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
@mkdir -p $(@D)
|
2016-10-28 12:23:48 +08:00
|
|
|
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
|
|
|
|
$(objroot)test/integration/%$(EXE): $(objroot)test/integration/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
|
|
|
@mkdir -p $(@D)
|
2019-01-08 09:31:53 +08:00
|
|
|
$(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LJEMALLOC) $(LDFLAGS) $(filter-out -lm,$(filter -lrt -pthread -lstdc++,$(LIBS))) $(LM) $(EXTRA_LDFLAGS)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
|
|
|
|
$(objroot)test/integration/cpp/%$(EXE): $(objroot)test/integration/cpp/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
$(CXX) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(EXTRA_LDFLAGS)
|
2012-04-16 22:30:26 +08:00
|
|
|
|
2020-05-05 05:58:25 +08:00
|
|
|
$(objroot)test/analyze/%$(EXE): $(objroot)test/analyze/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_ANALYZE_OBJS)
|
|
|
|
@mkdir -p $(@D)
|
|
|
|
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
|
|
|
|
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
$(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_STRESS_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
2010-08-14 06:42:29 +08:00
|
|
|
@mkdir -p $(@D)
|
2016-10-28 12:23:48 +08:00
|
|
|
$(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
|
2010-08-14 06:42:29 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
build_lib_shared: $(DSOS)
|
|
|
|
build_lib_static: $(STATIC_LIBS)
|
2018-12-15 04:28:34 +08:00
|
|
|
ifeq ($(enable_shared), 1)
|
|
|
|
build_lib: build_lib_shared
|
|
|
|
endif
|
|
|
|
ifeq ($(enable_static), 1)
|
|
|
|
build_lib: build_lib_static
|
|
|
|
endif
|
2012-03-03 08:38:37 +08:00
|
|
|
|
2010-04-03 04:50:53 +08:00
|
|
|
install_bin:
|
2016-09-07 14:34:17 +08:00
|
|
|
$(INSTALL) -d $(BINDIR)
|
2010-04-03 04:50:53 +08:00
|
|
|
@for b in $(BINS); do \
|
2016-09-07 14:34:17 +08:00
|
|
|
echo "$(INSTALL) -m 755 $$b $(BINDIR)"; \
|
|
|
|
$(INSTALL) -m 755 $$b $(BINDIR); \
|
2010-04-03 04:50:53 +08:00
|
|
|
done
|
|
|
|
|
2010-03-04 07:48:20 +08:00
|
|
|
install_include:
|
2016-09-07 14:34:17 +08:00
|
|
|
$(INSTALL) -d $(INCLUDEDIR)/jemalloc
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
@for h in $(C_HDRS); do \
|
2016-09-07 14:34:17 +08:00
|
|
|
echo "$(INSTALL) -m 644 $$h $(INCLUDEDIR)/jemalloc"; \
|
|
|
|
$(INSTALL) -m 644 $$h $(INCLUDEDIR)/jemalloc; \
|
2009-06-24 10:01:18 +08:00
|
|
|
done
|
2010-03-04 07:48:20 +08:00
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
install_lib_shared: $(DSOS)
|
2016-09-07 14:34:17 +08:00
|
|
|
$(INSTALL) -d $(LIBDIR)
|
|
|
|
$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)
|
2012-04-19 00:29:40 +08:00
|
|
|
ifneq ($(SOREV),$(SO))
|
|
|
|
ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO)
|
|
|
|
endif
|
2012-03-03 08:38:37 +08:00
|
|
|
|
2012-04-19 00:29:41 +08:00
|
|
|
install_lib_static: $(STATIC_LIBS)
|
2016-09-07 14:34:17 +08:00
|
|
|
$(INSTALL) -d $(LIBDIR)
|
2012-04-19 00:29:41 +08:00
|
|
|
@for l in $(STATIC_LIBS); do \
|
2016-09-07 14:34:17 +08:00
|
|
|
echo "$(INSTALL) -m 755 $$l $(LIBDIR)"; \
|
|
|
|
$(INSTALL) -m 755 $$l $(LIBDIR); \
|
2012-04-19 00:29:41 +08:00
|
|
|
done
|
2010-03-04 07:48:20 +08:00
|
|
|
|
2014-09-20 05:01:23 +08:00
|
|
|
install_lib_pc: $(PC)
|
2016-09-07 14:34:17 +08:00
|
|
|
$(INSTALL) -d $(LIBDIR)/pkgconfig
|
2014-09-20 05:01:23 +08:00
|
|
|
@for l in $(PC); do \
|
2016-09-07 14:34:17 +08:00
|
|
|
echo "$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig"; \
|
|
|
|
$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig; \
|
2014-09-20 05:01:23 +08:00
|
|
|
done
|
|
|
|
|
2018-12-15 04:28:34 +08:00
|
|
|
ifeq ($(enable_shared), 1)
|
|
|
|
install_lib: install_lib_shared
|
|
|
|
endif
|
|
|
|
ifeq ($(enable_static), 1)
|
|
|
|
install_lib: install_lib_static
|
|
|
|
endif
|
|
|
|
install_lib: install_lib_pc
|
2012-03-03 08:38:37 +08:00
|
|
|
|
|
|
|
install_doc_html:
|
2016-09-07 14:34:17 +08:00
|
|
|
$(INSTALL) -d $(DATADIR)/doc/jemalloc$(install_suffix)
|
2010-11-25 14:00:02 +08:00
|
|
|
@for d in $(DOCS_HTML); do \
|
2016-09-07 14:34:17 +08:00
|
|
|
echo "$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \
|
|
|
|
$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
|
2010-11-25 14:00:02 +08:00
|
|
|
done
|
|
|
|
|
2012-03-03 08:38:37 +08:00
|
|
|
install_doc_man:
|
2016-09-07 14:34:17 +08:00
|
|
|
$(INSTALL) -d $(MANDIR)/man3
|
2010-11-25 14:00:02 +08:00
|
|
|
@for d in $(DOCS_MAN3); do \
|
2016-09-07 14:34:17 +08:00
|
|
|
echo "$(INSTALL) -m 644 $$d $(MANDIR)/man3"; \
|
|
|
|
$(INSTALL) -m 644 $$d $(MANDIR)/man3; \
|
2009-06-24 10:01:18 +08:00
|
|
|
done
|
|
|
|
|
2019-02-08 10:47:49 +08:00
|
|
|
install_doc: build_doc install_doc_html install_doc_man
|
2010-11-25 14:00:02 +08:00
|
|
|
|
2019-04-19 19:44:18 +08:00
|
|
|
install: install_bin install_include install_lib
|
|
|
|
|
|
|
|
ifeq ($(enable_doc), 1)
|
|
|
|
install: install_doc
|
|
|
|
endif
|
2010-03-04 07:48:20 +08:00
|
|
|
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
tests_unit: $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%$(EXE))
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
tests_integration: $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%$(EXE)) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%$(EXE))
|
2020-05-05 05:58:25 +08:00
|
|
|
tests_analyze: $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%$(EXE))
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
tests_stress: $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%$(EXE))
|
2020-05-05 05:58:25 +08:00
|
|
|
tests: tests_unit tests_integration tests_analyze tests_stress
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
|
|
|
|
check_unit_dir:
|
|
|
|
@mkdir -p $(objroot)test/unit
|
|
|
|
check_integration_dir:
|
|
|
|
@mkdir -p $(objroot)test/integration
|
2020-05-05 05:58:25 +08:00
|
|
|
analyze_dir:
|
|
|
|
@mkdir -p $(objroot)test/analyze
|
2015-09-12 11:59:00 +08:00
|
|
|
stress_dir:
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
@mkdir -p $(objroot)test/stress
|
2015-09-12 11:59:00 +08:00
|
|
|
check_dir: check_unit_dir check_integration_dir
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
|
|
|
|
check_unit: tests_unit check_unit_dir
|
2016-10-13 01:40:27 +08:00
|
|
|
$(SHELL) $(objroot)test/test.sh $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%)
|
2015-06-24 09:47:07 +08:00
|
|
|
check_integration_prof: tests_integration check_integration_dir
|
|
|
|
ifeq ($(enable_prof), 1)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(MALLOC_CONF)="prof:true" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
|
|
|
$(MALLOC_CONF)="prof:true,prof_active:false" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
2015-06-24 09:47:07 +08:00
|
|
|
endif
|
2016-02-20 12:09:31 +08:00
|
|
|
check_integration_decay: tests_integration check_integration_dir
|
2017-05-18 01:47:00 +08:00
|
|
|
$(MALLOC_CONF)="dirty_decay_ms:-1,muzzy_decay_ms:-1" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
|
|
|
$(MALLOC_CONF)="dirty_decay_ms:0,muzzy_decay_ms:0" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
check_integration: tests_integration check_integration_dir
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
$(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
2020-05-05 05:58:25 +08:00
|
|
|
analyze: tests_analyze analyze_dir
|
|
|
|
ifeq ($(enable_prof), 1)
|
|
|
|
$(MALLOC_CONF)="prof:true" $(SHELL) $(objroot)test/test.sh $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%)
|
|
|
|
else
|
|
|
|
$(SHELL) $(objroot)test/test.sh $(TESTS_ANALYZE:$(srcroot)%.c=$(objroot)%)
|
|
|
|
endif
|
2015-09-12 11:59:00 +08:00
|
|
|
stress: tests_stress stress_dir
|
2013-12-07 10:27:33 +08:00
|
|
|
$(SHELL) $(objroot)test/test.sh $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%)
|
2016-02-20 12:09:31 +08:00
|
|
|
check: check_unit check_integration check_integration_decay check_integration_prof
|
2013-12-07 10:27:33 +08:00
|
|
|
|
2009-06-24 10:01:18 +08:00
|
|
|
clean:
|
2017-05-05 02:20:43 +08:00
|
|
|
rm -f $(PRIVATE_NAMESPACE_HDRS)
|
2017-05-17 14:12:59 +08:00
|
|
|
rm -f $(PRIVATE_NAMESPACE_GEN_HDRS)
|
2017-05-05 02:20:43 +08:00
|
|
|
rm -f $(C_SYM_OBJS)
|
|
|
|
rm -f $(C_SYMS)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
rm -f $(C_OBJS)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
rm -f $(CPP_OBJS)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
rm -f $(C_PIC_OBJS)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
rm -f $(CPP_PIC_OBJS)
|
2017-05-05 02:20:43 +08:00
|
|
|
rm -f $(C_JET_SYM_OBJS)
|
|
|
|
rm -f $(C_JET_SYMS)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
rm -f $(C_JET_OBJS)
|
|
|
|
rm -f $(C_TESTLIB_OBJS)
|
2017-05-05 02:20:43 +08:00
|
|
|
rm -f $(C_SYM_OBJS:%.$(O)=%.d)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
rm -f $(C_OBJS:%.$(O)=%.d)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
rm -f $(CPP_OBJS:%.$(O)=%.d)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
rm -f $(C_PIC_OBJS:%.$(O)=%.d)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
rm -f $(CPP_PIC_OBJS:%.$(O)=%.d)
|
2017-05-05 02:20:43 +08:00
|
|
|
rm -f $(C_JET_SYM_OBJS:%.$(O)=%.d)
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
rm -f $(C_JET_OBJS:%.$(O)=%.d)
|
|
|
|
rm -f $(C_TESTLIB_OBJS:%.$(O)=%.d)
|
|
|
|
rm -f $(TESTS_OBJS:%.$(O)=%$(EXE))
|
|
|
|
rm -f $(TESTS_OBJS)
|
|
|
|
rm -f $(TESTS_OBJS:%.$(O)=%.d)
|
|
|
|
rm -f $(TESTS_OBJS:%.$(O)=%.out)
|
jemalloc cpp new/delete bindings
Adds cpp bindings for jemalloc, along with necessary autoconf settings.
This is mostly to add sized deallocation support, which can't be added
from C directly. Sized deallocation is ~10% microbench improvement.
* Import ax_cxx_compile_stdcxx.m4 from the autoconf repo, seems like the
easiest way to get c++14 detection.
* Adds various other changes, like CXXFLAGS, to configure.ac.
* Adds new rules to Makefile.in for src/jemalloc-cpp.cpp, and a basic
unittest.
* Both new and delete are overridden, to ensure jemalloc is used for
both.
* TODO future enhancement of avoiding extra PLT thunks for new and
delete - sdallocx and malloc are publicly exported jemalloc symbols,
using an alias would link them directly. Unfortunately, was having
trouble getting it to play nice with jemalloc's namespace support.
Testing:
Tested gcc 4.8, gcc 5, gcc 5.2, clang 4.0. Only gcc >= 5 has sized
deallocation support, verified that the rest build correctly.
Tested mac osx and Centos.
Tested --with-jemalloc-prefix and --without-export.
This resolves #202.
2016-10-24 06:56:30 +08:00
|
|
|
rm -f $(TESTS_CPP_OBJS:%.$(O)=%$(EXE))
|
|
|
|
rm -f $(TESTS_CPP_OBJS)
|
|
|
|
rm -f $(TESTS_CPP_OBJS:%.$(O)=%.d)
|
|
|
|
rm -f $(TESTS_CPP_OBJS:%.$(O)=%.out)
|
2011-02-16 06:13:38 +08:00
|
|
|
rm -f $(DSOS) $(STATIC_LIBS)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
distclean: clean
|
2015-01-23 09:55:58 +08:00
|
|
|
rm -f $(objroot)bin/jemalloc-config
|
Refactor to support more varied testing.
Refactor the test harness to support three types of tests:
- unit: White box unit tests. These tests have full access to all
internal jemalloc library symbols. Though in actuality all symbols
are prefixed by jet_, macro-based name mangling abstracts this away
from test code.
- integration: Black box integration tests. These tests link with
the installable shared jemalloc library, and with the exception of
some utility code and configure-generated macro definitions, they have
no access to jemalloc internals.
- stress: Black box stress tests. These tests link with the installable
shared jemalloc library, as well as with an internal allocator with
symbols prefixed by jet_ (same as for unit tests) that can be used to
allocate data structures that are internal to the test code.
Move existing tests into test/{unit,integration}/ as appropriate.
Split out internal parts of jemalloc_defs.h.in and put them in
jemalloc_internal_defs.h.in. This reduces internals exposure to
applications that #include <jemalloc/jemalloc.h>.
Refactor jemalloc.h header generation so that a single header file
results, and the prototypes can be used to generate jet_ prototypes for
tests. Split jemalloc.h.in into multiple parts (jemalloc_defs.h.in,
jemalloc_macros.h.in, jemalloc_protos.h.in, jemalloc_mangle.h.in) and
use a shell script to generate a unified jemalloc.h at configure time.
Change the default private namespace prefix from "" to "je_".
Add missing private namespace mangling.
Remove hard-coded private_namespace.h. Instead generate it and
private_unnamespace.h from private_symbols.txt. Use similar logic for
public symbols, which aids in name mangling for jet_ symbols.
Add test_warn() and test_fail(). Replace existing exit(1) calls with
test_fail() calls.
2013-12-01 07:25:42 +08:00
|
|
|
rm -f $(objroot)bin/jemalloc.sh
|
2015-05-06 06:43:34 +08:00
|
|
|
rm -f $(objroot)bin/jeprof
|
2012-04-16 22:30:22 +08:00
|
|
|
rm -f $(objroot)config.log
|
|
|
|
rm -f $(objroot)config.status
|
|
|
|
rm -f $(objroot)config.stamp
|
|
|
|
rm -f $(cfghdrs_out)
|
|
|
|
rm -f $(cfgoutputs_out)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
relclean: distclean
|
2012-04-16 22:30:22 +08:00
|
|
|
rm -f $(objroot)configure
|
2014-12-24 06:10:08 +08:00
|
|
|
rm -f $(objroot)VERSION
|
2010-11-25 14:00:02 +08:00
|
|
|
rm -f $(DOCS_HTML)
|
|
|
|
rm -f $(DOCS_MAN3)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
|
|
|
#===============================================================================
|
|
|
|
# Re-configuration rules.
|
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
ifeq ($(enable_autogen), 1)
|
|
|
|
$(srcroot)configure : $(srcroot)configure.ac
|
|
|
|
cd ./$(srcroot) && $(AUTOCONF)
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(objroot)config.status : $(srcroot)configure
|
|
|
|
./$(objroot)config.status --recheck
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(srcroot)config.stamp.in : $(srcroot)configure.ac
|
|
|
|
echo stamp > $(srcroot)config.stamp.in
|
2009-06-24 10:01:18 +08:00
|
|
|
|
2012-04-16 22:30:22 +08:00
|
|
|
$(objroot)config.stamp : $(cfgoutputs_in) $(cfghdrs_in) $(srcroot)configure
|
|
|
|
./$(objroot)config.status
|
2009-06-24 10:01:18 +08:00
|
|
|
@touch $@
|
|
|
|
|
|
|
|
# There must be some action in order for make to re-read Makefile when it is
|
|
|
|
# out of date.
|
2012-04-16 22:30:22 +08:00
|
|
|
$(cfgoutputs_out) $(cfghdrs_out) : $(objroot)config.stamp
|
2009-06-24 10:01:18 +08:00
|
|
|
@true
|
|
|
|
endif
|