diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-26 17:59:36 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-26 17:59:36 +0200 |
commit | be1786f7b0e692d8f4326dbf53e7d0689813ee2d (patch) | |
tree | cefa04b915833e90abf5bba51c5c6c81dc3c6431 | |
parent | 698b659ee29fd84b02ac2632085d31caaef081e9 (diff) | |
download | UXP-be1786f7b0e692d8f4326dbf53e7d0689813ee2d.tar UXP-be1786f7b0e692d8f4326dbf53e7d0689813ee2d.tar.gz UXP-be1786f7b0e692d8f4326dbf53e7d0689813ee2d.tar.lz UXP-be1786f7b0e692d8f4326dbf53e7d0689813ee2d.tar.xz UXP-be1786f7b0e692d8f4326dbf53e7d0689813ee2d.zip |
Remove support for system jemalloc.
-rw-r--r-- | build/autoconf/jemalloc.m4 | 2 | ||||
-rw-r--r-- | memory/build/jemalloc_config.cpp | 4 | ||||
-rw-r--r-- | memory/build/moz.build | 3 | ||||
-rw-r--r-- | memory/build/mozjemalloc_compat.c | 6 | ||||
-rw-r--r-- | memory/build/mozmemory_wrap.h | 57 | ||||
-rw-r--r-- | memory/build/replace_malloc.c | 4 | ||||
-rw-r--r-- | memory/moz.build | 3 | ||||
-rw-r--r-- | mozglue/build/moz.build | 2 | ||||
-rw-r--r-- | old-configure.in | 12 | ||||
-rw-r--r-- | storage/moz.build | 3 |
10 files changed, 32 insertions, 64 deletions
diff --git a/build/autoconf/jemalloc.m4 b/build/autoconf/jemalloc.m4 index 3b9c603f7..eae4e4d3a 100644 --- a/build/autoconf/jemalloc.m4 +++ b/build/autoconf/jemalloc.m4 @@ -8,7 +8,7 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then # Run jemalloc configure script - if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then + if test "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind" # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c # on Windows, so just export memalign on all platforms. diff --git a/memory/build/jemalloc_config.cpp b/memory/build/jemalloc_config.cpp index 441fd8a2b..1a83c79e2 100644 --- a/memory/build/jemalloc_config.cpp +++ b/memory/build/jemalloc_config.cpp @@ -11,12 +11,8 @@ #include <mozilla/Assertions.h> #include "mozilla/Types.h" -#if defined(MOZ_SYSTEM_JEMALLOC) -#include MALLOC_H -#else #define DLLEXPORT #include "jemalloc/jemalloc.h" -#endif #ifdef XP_WIN #include <windows.h> diff --git a/memory/build/moz.build b/memory/build/moz.build index 8d80561b1..bd6c2503e 100644 --- a/memory/build/moz.build +++ b/memory/build/moz.build @@ -46,8 +46,7 @@ if CONFIG['MOZ_GLUE_IN_PROGRAM']: DIST_INSTALL = True # Keep jemalloc separated when mozglue is statically linked -if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or - CONFIG['MOZ_SYSTEM_JEMALLOC']): +if CONFIG['MOZ_MEMORY'] and CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'): FINAL_LIBRARY = 'mozglue' if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin': diff --git a/memory/build/mozjemalloc_compat.c b/memory/build/mozjemalloc_compat.c index 6591892c1..0b3b333d4 100644 --- a/memory/build/mozjemalloc_compat.c +++ b/memory/build/mozjemalloc_compat.c @@ -14,11 +14,7 @@ #include <stdbool.h> -#if defined(MOZ_SYSTEM_JEMALLOC) -# include MALLOC_H -#else -# include "jemalloc/jemalloc.h" -#endif +#include "jemalloc/jemalloc.h" /* * CTL_* macros are from memory/jemalloc/src/src/stats.c with changes: diff --git a/memory/build/mozmemory_wrap.h b/memory/build/mozmemory_wrap.h index 066d57782..fd53531c1 100644 --- a/memory/build/mozmemory_wrap.h +++ b/memory/build/mozmemory_wrap.h @@ -125,43 +125,38 @@ #include "mozilla/Types.h" -#if !defined(MOZ_SYSTEM_JEMALLOC) -# ifdef MOZ_MEMORY_IMPL -# if defined(MOZ_JEMALLOC_IMPL) && defined(MOZ_REPLACE_MALLOC) && !defined(MOZ_REPLACE_JEMALLOC) -# define mozmem_malloc_impl(a) je_ ## a -# define mozmem_jemalloc_impl(a) je_ ## a -# else -# define MOZ_JEMALLOC_API MFBT_API -# ifdef MOZ_REPLACE_JEMALLOC -# define MOZ_MEMORY_API MFBT_API -# define mozmem_malloc_impl(a) replace_ ## a -# define mozmem_jemalloc_impl(a) replace_ ## a -# elif (defined(XP_WIN) || defined(XP_DARWIN)) -# if defined(MOZ_REPLACE_MALLOC) -# define mozmem_malloc_impl(a) a ## _impl -# else -# define mozmem_malloc_impl(a) je_ ## a -# endif +#ifdef MOZ_MEMORY_IMPL +# if defined(MOZ_JEMALLOC_IMPL) && defined(MOZ_REPLACE_MALLOC) && !defined(MOZ_REPLACE_JEMALLOC) +# define mozmem_malloc_impl(a) je_ ## a +# define mozmem_jemalloc_impl(a) je_ ## a +# else +# define MOZ_JEMALLOC_API MFBT_API +# ifdef MOZ_REPLACE_JEMALLOC +# define MOZ_MEMORY_API MFBT_API +# define mozmem_malloc_impl(a) replace_ ## a +# define mozmem_jemalloc_impl(a) replace_ ## a +# elif (defined(XP_WIN) || defined(XP_DARWIN)) +# if defined(MOZ_REPLACE_MALLOC) +# define mozmem_malloc_impl(a) a ## _impl # else -# define MOZ_MEMORY_API MFBT_API -# if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) -# define MOZ_WRAP_NEW_DELETE -# endif +# define mozmem_malloc_impl(a) je_ ## a +# endif +# else +# define MOZ_MEMORY_API MFBT_API +# if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK) +# define MOZ_WRAP_NEW_DELETE # endif -# endif -# ifdef XP_WIN -# define mozmem_dup_impl(a) wrap_ ## a # endif # endif - -/* All other jemalloc3 functions are prefixed with "je_", except when - * building against an unprefixed system jemalloc library */ -# define je_(a) je_ ## a -#else /* defined(MOZ_SYSTEM_JEMALLOC) */ -# define je_(a) a +# ifdef XP_WIN +# define mozmem_dup_impl(a) wrap_ ## a +# endif #endif -#if !defined(MOZ_MEMORY_IMPL) || defined(MOZ_SYSTEM_JEMALLOC) +/* All other jemalloc3 functions are prefixed with "je_" */ +#define je_(a) je_ ## a + +#if !defined(MOZ_MEMORY_IMPL) # define MOZ_MEMORY_API MFBT_API # define MOZ_JEMALLOC_API MFBT_API #endif diff --git a/memory/build/replace_malloc.c b/memory/build/replace_malloc.c index 26dd8c2d6..f4c7eb878 100644 --- a/memory/build/replace_malloc.c +++ b/memory/build/replace_malloc.c @@ -10,10 +10,6 @@ # error Should not compile this file when replace-malloc is disabled #endif -#ifdef MOZ_SYSTEM_JEMALLOC -# error Should not compile this file when we want to use native jemalloc -#endif - #include "mozmemory_wrap.h" /* Declare all je_* functions */ diff --git a/memory/moz.build b/memory/moz.build index cf8bbc0f3..bdf262293 100644 --- a/memory/moz.build +++ b/memory/moz.build @@ -21,8 +21,7 @@ if CONFIG['MOZ_MEMORY']: ] if CONFIG['MOZ_JEMALLOC4'] or CONFIG['MOZ_REPLACE_MALLOC']: - if not CONFIG['MOZ_SYSTEM_JEMALLOC']: - DIRS += ['jemalloc'] + DIRS += ['jemalloc'] if CONFIG['MOZ_REPLACE_MALLOC']: DIRS += ['replace'] diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build index d28974778..5f61d847d 100644 --- a/mozglue/build/moz.build +++ b/mozglue/build/moz.build @@ -32,7 +32,7 @@ if CONFIG['OS_TARGET'] == 'WINNT': if not CONFIG['JS_STANDALONE']: - if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_SYSTEM_JEMALLOC'] or FORCE_SHARED_LIB): + if CONFIG['MOZ_MEMORY'] and FORCE_SHARED_LIB: pass # TODO: SHARED_LIBRARY_LIBS go here else: diff --git a/old-configure.in b/old-configure.in index dabd37e6d..8eaefbbdb 100644 --- a/old-configure.in +++ b/old-configure.in @@ -4262,8 +4262,6 @@ Android|WINNT|Darwin) esac if test -n "$MOZ_REPLACE_MALLOC"; then - MOZ_SYSTEM_JEMALLOC= - dnl Replace-malloc Mac linkage quirks if test -n "$MACOSX_DEPLOYMENT_TARGET"; then AC_CACHE_CHECK([how to do weak dynamic linking], @@ -4330,15 +4328,6 @@ if test -z "$MOZ_MEMORY"; then ;; esac else - if test -n "$MOZ_JEMALLOC4" -a -z "$MOZ_REPLACE_MALLOC"; then - MOZ_SYSTEM_JEMALLOC=1 - AC_CHECK_FUNCS(mallctl nallocx,, - [MOZ_SYSTEM_JEMALLOC= - break]) - if test -n "$MOZ_SYSTEM_JEMALLOC"; then - AC_DEFINE(MOZ_SYSTEM_JEMALLOC) - fi - fi if test "x$MOZ_DEBUG" = "x1"; then AC_DEFINE(MOZ_MEMORY_DEBUG) fi @@ -4351,7 +4340,6 @@ else ;; esac fi # MOZ_MEMORY -AC_SUBST(MOZ_SYSTEM_JEMALLOC) AC_SUBST(MOZ_GLUE_IN_PROGRAM) # Allow the application to provide a subconfigure script. diff --git a/storage/moz.build b/storage/moz.build index 8863105c9..216a1cf74 100644 --- a/storage/moz.build +++ b/storage/moz.build @@ -98,8 +98,7 @@ FINAL_LIBRARY = 'xul' # Note: On Windows our sqlite build assumes we use jemalloc. If you disable # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in. -if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_SYSTEM_SQLITE'] - or CONFIG['MOZ_SYSTEM_JEMALLOC']): +if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_SYSTEM_SQLITE']: if CONFIG['OS_TARGET'] != 'Android': DEFINES['MOZ_STORAGE_MEMORY'] = True |