author | Nicholas Nethercote <nnethercote@mozilla.com> |
Thu, 21 Jan 2016 16:58:50 -0800 | |
changeset 281435 | 16b98426457ca48e93c896bf4cc0d992b59d8832 |
parent 281434 | 0517f538cdf85acc421736e65b3febab41d9706d |
child 281436 | 29271e7d0c2362109080fb8cfbbbbadba0c4f0f6 |
push id | 70789 |
push user | nnethercote@mozilla.com |
push date | Sun, 24 Jan 2016 23:16:44 +0000 |
treeherder | mozilla-inbound@29271e7d0c23 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | glandium |
bugs | 1144842 |
milestone | 46.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
configure.in | file | annotate | diff | comparison | revisions | |
memory/replace/dmd/DMD.cpp | file | annotate | diff | comparison | revisions |
--- a/configure.in +++ b/configure.in @@ -1795,16 +1795,39 @@ if test "$MOZ_PROFILING" -a -z "$STRIP_F case "$OS_TARGET" in Linux|DragonFly|FreeBSD|NetBSD|OpenBSD) STRIP_FLAGS="--strip-debug" ;; esac fi dnl ======================================================== +dnl = Enable DMD +dnl ======================================================== + +MOZ_ARG_ENABLE_BOOL(dmd, +[ --enable-dmd Enable DMD; also enables jemalloc, replace-malloc and profiling], + MOZ_DMD=1, + MOZ_DMD= ) + +if test "$MOZ_DMD"; then + AC_DEFINE(MOZ_DMD) + + if test "${CPU_ARCH}" = "arm"; then + CFLAGS="$CFLAGS -funwind-tables" + CXXFLAGS="$CXXFLAGS -funwind-tables" + fi + + MOZ_MEMORY=1 # DMD enables jemalloc + MOZ_REPLACE_MALLOC=1 # DMD enables replace-malloc + MOZ_PROFILING=1 # DMD enables profiling +fi +AC_SUBST(MOZ_DMD) + +dnl ======================================================== dnl Profiling dnl ======================================================== if test -n "$MOZ_PROFILING"; then AC_DEFINE(MOZ_PROFILING) fi dnl ======================================================== dnl System overrides of the defaults for host @@ -7058,38 +7081,16 @@ if test -n "$MOZ_DUMP_PAINTING"; then AC_DEFINE(MOZ_DUMP_PAINTING) AC_DEFINE(MOZ_LAYERS_HAVE_LOG) fi if test -n "$MOZ_DEBUG"; then AC_DEFINE(MOZ_DUMP_PAINTING) fi dnl ======================================================== -dnl = Enable DMD -dnl ======================================================== - -MOZ_ARG_ENABLE_BOOL(dmd, -[ --enable-dmd Enable DMD; also enables jemalloc and replace-malloc], - MOZ_DMD=1, - MOZ_DMD= ) - -if test "$MOZ_DMD"; then - AC_DEFINE(MOZ_DMD) - - if test "${CPU_ARCH}" = "arm"; then - CFLAGS="$CFLAGS -funwind-tables" - CXXFLAGS="$CXXFLAGS -funwind-tables" - fi - - MOZ_MEMORY=1 # DMD enables jemalloc - MOZ_REPLACE_MALLOC=1 # DMD enables replace-malloc -fi -AC_SUBST(MOZ_DMD) - -dnl ======================================================== dnl = Enable jemalloc dnl ======================================================== MOZ_ARG_ENABLE_BOOL(jemalloc, [ --enable-jemalloc Replace memory allocator with jemalloc], MOZ_MEMORY=1, MOZ_MEMORY=) case "${OS_TARGET}" in
--- a/memory/replace/dmd/DMD.cpp +++ b/memory/replace/dmd/DMD.cpp @@ -7,20 +7,21 @@ #include <ctype.h> #include <errno.h> #include <limits.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#if !defined(MOZ_PROFILING) +#error "DMD requires MOZ_PROFILING" +#endif + #ifdef XP_WIN -#if defined(MOZ_OPTIMIZE) && !defined(MOZ_PROFILING) -#error "Optimized, DMD-enabled builds on Windows must be built with --enable-profiling" -#endif #include <windows.h> #include <process.h> #else #include <unistd.h> #endif #ifdef ANDROID #include <android/log.h>