Backed out changeset fe08cc555248 - bug 517097 - make enabling debug symbols more sane because it added -fno-inline to opt builds and a 50% perf regression

This commit is contained in:
Benjamin Smedberg 2010-02-11 17:14:38 -05:00
Родитель de1818ddc2
Коммит 9120155e71
6 изменённых файлов: 177 добавлений и 71 удалений

Просмотреть файл

@ -94,11 +94,12 @@ MOZ_CORETEXT = @MOZ_CORETEXT@
MOZ_JS_LIBS = @MOZ_JS_LIBS@
MOZ_DEBUG = @MOZ_DEBUG@
MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@
MOZ_DEBUG_ENABLE_DEFS = @MOZ_DEBUG_ENABLE_DEFS@
MOZ_DEBUG_DISABLE_DEFS = @MOZ_DEBUG_DISABLE_DEFS@
MOZ_DEBUG_FLAGS = @MOZ_DEBUG_FLAGS@
MOZ_DEBUG_LDFLAGS=@MOZ_DEBUG_LDFLAGS@
MOZ_DBGRINFO_MODULES = @MOZ_DBGRINFO_MODULES@
MOZ_EXTENSIONS = @MOZ_EXTENSIONS@
MOZ_IMG_DECODERS= @MOZ_IMG_DECODERS@
MOZ_IMG_ENCODERS= @MOZ_IMG_ENCODERS@
@ -593,6 +594,7 @@ MOZILLA_OFFICIAL = @MOZILLA_OFFICIAL@
# Win32 options
MOZ_BROWSE_INFO = @MOZ_BROWSE_INFO@
MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
MOZ_QUANTIFY = @MOZ_QUANTIFY@
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@

Просмотреть файл

@ -162,19 +162,72 @@ endif
_DEBUG_CFLAGS :=
_DEBUG_LDFLAGS :=
ifndef MOZ_DEBUG
# global debugging is disabled
# check if it was explicitly enabled for this module
ifneq (, $(findstring $(MODULE), $(MOZ_DEBUG_MODULES)))
MOZ_DEBUG:=1
endif
else
# global debugging is enabled
# check if it was explicitly disabled for this module
ifneq (, $(findstring ^$(MODULE), $(MOZ_DEBUG_MODULES)))
MOZ_DEBUG:=
endif
endif
ifdef MOZ_DEBUG
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
else
_DEBUG_CFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
ifdef MOZ_DEBUG_SYMBOLS
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
# determine if -g should be passed to the compiler, based on
# the current module, and the value of MOZ_DBGRINFO_MODULES
ifdef MOZ_DEBUG
MOZ_DBGRINFO_MODULES += ALL_MODULES
pattern := ALL_MODULES ^ALL_MODULES
else
MOZ_DBGRINFO_MODULES += ^ALL_MODULES
pattern := ALL_MODULES ^ALL_MODULES
endif
ifdef MODULE
# our current Makefile specifies a module name - add it to our pattern
pattern += $(MODULE) ^$(MODULE)
endif
# start by finding the first relevant module name
# (remember that the order of the module names in MOZ_DBGRINFO_MODULES
# is reversed from the order the user specified to configure -
# this allows the user to put general names at the beginning
# of the list, and to override them with explicit module names later
# in the list)
first_match:=$(firstword $(filter $(pattern), $(MOZ_DBGRINFO_MODULES)))
ifeq ($(first_match), $(MODULE))
# the user specified explicitly that
# this module should be compiled with -g
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
else
ifneq ($(first_match), ^$(MODULE))
ifeq ($(first_match), ALL_MODULES)
# the user didn't mention this module explicitly,
# but wanted all modules to be compiled with -g
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
endif
endif
# append debug flags
# (these might have been above when processing MOZ_DBGRINFO_MODULES)
OS_CFLAGS += $(_DEBUG_CFLAGS)
OS_CXXFLAGS += $(_DEBUG_CFLAGS)
OS_LDFLAGS += $(_DEBUG_LDFLAGS)

Просмотреть файл

@ -4604,6 +4604,7 @@ ENABLE_TESTS=1
MOZ_ACTIVEX_SCRIPTING_SUPPORT=
MOZ_BRANDING_DIRECTORY=
MOZ_OFFICIAL_BRANDING=
MOZ_DBGRINFO_MODULES=
MOZ_FEEDS=1
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp icon"
MOZ_IMG_ENCODERS_DEFAULT="png jpeg"
@ -6534,12 +6535,11 @@ fi
MOZ_ARG_ENABLE_STRING(debug,
[ --enable-debug[=DBG] Enable building with developer debug info
(using compiler flags DBG)],
(Using compiler flags DBG)],
[ if test "$enableval" != "no"; then
MOZ_DEBUG=1
if test -n "$enableval" -a "$enableval" != "yes"; then
if test -n "$enableval" && test "$enableval" != "yes"; then
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
_MOZ_DEBUG_FLAGS_SET=1
fi
else
MOZ_DEBUG=
@ -6633,37 +6633,33 @@ AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK)
dnl ========================================================
dnl = (Deprecated) generation of debugger info for specific modules
dnl = Enable/disable debug for specific modules only
dnl = module names beginning with ^ will be disabled
dnl ========================================================
MOZ_ARG_ENABLE_STRING(debug-modules,
[ --enable-debug-modules Enable/disable debug info for specific modules],
[ MOZ_DEBUG_MODULES=`echo $enableval| sed 's/,/ /g'` ] )
dnl ========================================================
dnl = Enable/disable generation of debugger info for specific modules only
dnl = the special module name ALL_MODULES can be used to denote all modules
dnl = module names beginning with ^ will be disabled
dnl ========================================================
MOZ_ARG_ENABLE_STRING(debugger-info-modules,
[ --enable-debugger-info-modules
Enable/disable debugger info for specific modules],
[ if test "$enableval" != "no"; then
AC_MSG_WARN([--enable-debugger-info-modules is deprecated, use --enable-debug-symbols instead])
MOZ_DEBUG_SYMBOLS=1
fi ])
dnl ========================================================
dnl = Enable generation of debug symbols
dnl ========================================================
MOZ_ARG_ENABLE_STRING(debug-symbols,
[ --enable-debug-symbols[=DBG] Enable debugging symbols
(using compiler flags DBG)],
[ if test "$enableval" != "no"; then
MOZ_DEBUG_SYMBOLS=1
if test -n "$enableval" -a "$enableval" != "yes"; then
if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
else
AC_MSG_ERROR([--enable-debug-symbols flags cannot be used with --enable-debug flags])
fi
[ for i in `echo $enableval | sed 's/,/ /g'`; do
dnl note that the list of module names is reversed as it is copied
dnl this is important, as it will allow config.mk to interpret stuff like
dnl "^ALL_MODULES xpcom" properly
if test "$i" = "no"; then
i="^ALL_MODULES"
fi
fi ])
if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
AC_DEFINE(MOZ_DEBUG_SYMBOLS)
export MOZ_DEBUG_SYMBOLS
fi
if test "$i" = "yes"; then
i="ALL_MODULES"
fi
MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES";
done ])
dnl ========================================================
dnl Disable runtime logging checks
@ -8067,12 +8063,13 @@ AC_SUBST(MOZ_XSLT_STANDALONE)
AC_SUBST(MOZ_JS_LIBS)
AC_SUBST(MOZ_PSM)
AC_SUBST(MOZ_DEBUG)
AC_SUBST(MOZ_DEBUG_SYMBOLS)
AC_SUBST(MOZ_DEBUG_MODULES)
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
AC_SUBST(MOZ_DEBUG_FLAGS)
AC_SUBST(MOZ_DEBUG_LDFLAGS)
AC_SUBST(WARNINGS_AS_ERRORS)
AC_SUBST(MOZ_DBGRINFO_MODULES)
AC_SUBST(MOZ_EXTENSIONS)
AC_SUBST(MOZ_IMG_DECODERS)
AC_SUBST(MOZ_IMG_ENCODERS)
@ -8160,6 +8157,7 @@ AC_SUBST(MOZ_PKG_SPECIAL)
AC_SUBST(MOZILLA_OFFICIAL)
dnl win32 options
AC_SUBST(MOZ_DEBUG_SYMBOLS)
AC_SUBST(MOZ_MAPINFO)
AC_SUBST(MOZ_BROWSE_INFO)
AC_SUBST(MOZ_TOOLS_DIR)

Просмотреть файл

@ -76,12 +76,13 @@ MOZ_JS_LIBS = @MOZ_JS_LIBS@
MOZ_SYNC_BUILD_FILES = @MOZ_SYNC_BUILD_FILES@
MOZ_DEBUG = @MOZ_DEBUG@
MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
MOZ_DEBUG_MODULES = @MOZ_DEBUG_MODULES@
MOZ_PROFILE_MODULES = @MOZ_PROFILE_MODULES@
MOZ_DEBUG_ENABLE_DEFS = @MOZ_DEBUG_ENABLE_DEFS@
MOZ_DEBUG_DISABLE_DEFS = @MOZ_DEBUG_DISABLE_DEFS@
MOZ_DEBUG_FLAGS = @MOZ_DEBUG_FLAGS@
MOZ_DEBUG_LDFLAGS=@MOZ_DEBUG_LDFLAGS@
MOZ_DBGRINFO_MODULES = @MOZ_DBGRINFO_MODULES@
MOZ_EXTENSIONS = @MOZ_EXTENSIONS@
MOZ_IMG_DECODERS= @MOZ_IMG_DECODERS@
MOZ_IMG_ENCODERS= @MOZ_IMG_ENCODERS@
@ -317,6 +318,7 @@ MOZILLA_OFFICIAL = @MOZILLA_OFFICIAL@
# Win32 options
MOZ_BROWSE_INFO = @MOZ_BROWSE_INFO@
MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
MOZ_QUANTIFY = @MOZ_QUANTIFY@
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@

Просмотреть файл

@ -162,19 +162,72 @@ endif
_DEBUG_CFLAGS :=
_DEBUG_LDFLAGS :=
ifndef MOZ_DEBUG
# global debugging is disabled
# check if it was explicitly enabled for this module
ifneq (, $(findstring $(MODULE), $(MOZ_DEBUG_MODULES)))
MOZ_DEBUG:=1
endif
else
# global debugging is enabled
# check if it was explicitly disabled for this module
ifneq (, $(findstring ^$(MODULE), $(MOZ_DEBUG_MODULES)))
MOZ_DEBUG:=
endif
endif
ifdef MOZ_DEBUG
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS) $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
_DEBUG_CFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_ENABLE_DEFS)
else
_DEBUG_CFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
XULPPFLAGS += $(MOZ_DEBUG_DISABLE_DEFS)
ifdef MOZ_DEBUG_SYMBOLS
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
# determine if -g should be passed to the compiler, based on
# the current module, and the value of MOZ_DBGRINFO_MODULES
ifdef MOZ_DEBUG
MOZ_DBGRINFO_MODULES += ALL_MODULES
pattern := ALL_MODULES ^ALL_MODULES
else
MOZ_DBGRINFO_MODULES += ^ALL_MODULES
pattern := ALL_MODULES ^ALL_MODULES
endif
ifdef MODULE
# our current Makefile specifies a module name - add it to our pattern
pattern += $(MODULE) ^$(MODULE)
endif
# start by finding the first relevant module name
# (remember that the order of the module names in MOZ_DBGRINFO_MODULES
# is reversed from the order the user specified to configure -
# this allows the user to put general names at the beginning
# of the list, and to override them with explicit module names later
# in the list)
first_match:=$(firstword $(filter $(pattern), $(MOZ_DBGRINFO_MODULES)))
ifeq ($(first_match), $(MODULE))
# the user specified explicitly that
# this module should be compiled with -g
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
else
ifneq ($(first_match), ^$(MODULE))
ifeq ($(first_match), ALL_MODULES)
# the user didn't mention this module explicitly,
# but wanted all modules to be compiled with -g
_DEBUG_CFLAGS += $(MOZ_DEBUG_FLAGS)
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
endif
endif
endif
# append debug flags
# (these might have been above when processing MOZ_DBGRINFO_MODULES)
OS_CFLAGS += $(_DEBUG_CFLAGS)
OS_CXXFLAGS += $(_DEBUG_CFLAGS)
OS_LDFLAGS += $(_DEBUG_LDFLAGS)

Просмотреть файл

@ -3919,6 +3919,7 @@ MOZ_ARG_HEADER(Application)
BUILD_STATIC_LIBS=
ENABLE_TESTS=1
MOZ_DBGRINFO_MODULES=
dnl ========================================================
dnl =
@ -3991,9 +3992,8 @@ MOZ_ARG_ENABLE_STRING(debug,
(Using compiler flags DBG)],
[ if test "$enableval" != "no"; then
MOZ_DEBUG=1
if test -n "$enableval" -a "$enableval" != "yes"; then
if test -n "$enableval" && test "$enableval" != "yes"; then
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
_MOZ_DEBUG_FLAGS_SET=1
fi
else
MOZ_DEBUG=
@ -4074,37 +4074,33 @@ AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK)
dnl ========================================================
dnl = (Deprecated) generation of debugger info for specific modules
dnl = Enable/disable debug for specific modules only
dnl = module names beginning with ^ will be disabled
dnl ========================================================
MOZ_ARG_ENABLE_STRING(debug-modules,
[ --enable-debug-modules Enable/disable debug info for specific modules],
[ MOZ_DEBUG_MODULES=`echo $enableval| sed 's/,/ /g'` ] )
dnl ========================================================
dnl = Enable/disable generation of debugger info for specific modules only
dnl = the special module name ALL_MODULES can be used to denote all modules
dnl = module names beginning with ^ will be disabled
dnl ========================================================
MOZ_ARG_ENABLE_STRING(debugger-info-modules,
[ --enable-debugger-info-modules
Enable/disable debugger info for specific modules],
[ if test "$enableval" != "no"; then
AC_MSG_WARN([--enable-debugger-info-modules is deprecated, use --enable-debug-symbols instead])
MOZ_DEBUG_SYMBOLS=1
fi ])
dnl ========================================================
dnl = Enable generation of debug symbols
dnl ========================================================
MOZ_ARG_ENABLE_STRING(debug-symbols,
[ --enable-debug-symbols[=DBG] Enable debugging symbols
(using compiler flags DBG)],
[ if test "$enableval" != "no"; then
MOZ_DEBUG_SYMBOLS=1
if test -n "$enableval" -a "$enableval" != "yes"; then
if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
else
AC_MSG_ERROR([--enable-debug-symbols flags cannot be used with --enable-debug flags])
fi
[ for i in `echo $enableval | sed 's/,/ /g'`; do
dnl note that the list of module names is reversed as it is copied
dnl this is important, as it will allow config.mk to interpret stuff like
dnl "^ALL_MODULES xpcom" properly
if test "$i" = "no"; then
i="^ALL_MODULES"
fi
fi ])
if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
AC_DEFINE(MOZ_DEBUG_SYMBOLS)
export MOZ_DEBUG_SYMBOLS
fi
if test "$i" = "yes"; then
i="ALL_MODULES"
fi
MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES";
done ])
dnl ========================================================
dnl Enable Narcissus
@ -4889,12 +4885,13 @@ AC_SUBST(NS_USE_NATIVE)
AC_SUBST(MOZ_JS_LIBS)
AC_SUBST(MOZ_PSM)
AC_SUBST(MOZ_DEBUG)
AC_SUBST(MOZ_DEBUG_SYMBOLS)
AC_SUBST(MOZ_DEBUG_MODULES)
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
AC_SUBST(MOZ_DEBUG_FLAGS)
AC_SUBST(MOZ_DEBUG_LDFLAGS)
AC_SUBST(WARNINGS_AS_ERRORS)
AC_SUBST(MOZ_DBGRINFO_MODULES)
AC_SUBST(MOZ_LEAKY)
AC_SUBST(MOZ_JPROF)
AC_SUBST(MOZ_SHARK)
@ -4941,6 +4938,7 @@ AC_SUBST(MOZ_PKG_SPECIAL)
AC_SUBST(MOZILLA_OFFICIAL)
dnl win32 options
AC_SUBST(MOZ_DEBUG_SYMBOLS)
AC_SUBST(MOZ_MAPINFO)
AC_SUBST(MOZ_BROWSE_INFO)
AC_SUBST(MOZ_TOOLS_DIR)