mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1257434 - Move --enable-vtune and --enable-profiling to moz.configure. r=ted
old-configure and js/src/old-configure interestingly didn't handle both the same way. But vtune support is only actually implemented in js/src, so only the rules from js/src/old-configure matter (nothing was enforcing the decistion from old-configure to js/src/old-configure), and this is what is implemented here.
This commit is contained in:
parent
f701be5ac8
commit
03219400f6
@ -265,7 +265,9 @@ def wanted_mozconfig_variables(help):
|
||||
'MOZ_INSTRUMENT_EVENT_LOOP',
|
||||
'MOZ_INSTRUMENTS',
|
||||
'MOZ_JPROF',
|
||||
'MOZ_PROFILING',
|
||||
'MOZ_USE_SYSTRACE',
|
||||
'MOZ_VTUNE',
|
||||
'MOZTTDIR',
|
||||
'PERL',
|
||||
'RPMBUILD',
|
||||
|
@ -242,7 +242,6 @@ def old_configure_options(*options):
|
||||
'--enable-pref-extensions',
|
||||
'--enable-printing',
|
||||
'--enable-profilelocking',
|
||||
'--enable-profiling',
|
||||
'--enable-pulseaudio',
|
||||
'--enable-raw',
|
||||
'--enable-readline',
|
||||
@ -283,7 +282,6 @@ def old_configure_options(*options):
|
||||
'--enable-url-classifier',
|
||||
'--enable-valgrind',
|
||||
'--enable-verify-mar',
|
||||
'--enable-vtune',
|
||||
'--enable-warnings-as-errors',
|
||||
'--enable-webapp-runtime',
|
||||
'--enable-webrtc',
|
||||
|
@ -84,6 +84,7 @@ def instruments(value, target):
|
||||
set_config('MOZ_INSTRUMENTS', '1')
|
||||
set_define('MOZ_INSTRUMENTS', '1')
|
||||
add_old_configure_assignment('MOZ_INSTRUMENTS', '1')
|
||||
imply_option('--enable-profiling', reason='--enable-instruments')
|
||||
|
||||
|
||||
js_option('--enable-callgrind', env='MOZ_CALLGRIND',
|
||||
@ -93,3 +94,29 @@ js_option('--enable-callgrind', env='MOZ_CALLGRIND',
|
||||
def callgrind(value):
|
||||
if value:
|
||||
set_define('MOZ_CALLGRIND', '1')
|
||||
imply_option('--enable-profiling')
|
||||
|
||||
|
||||
js_option('--enable-profiling', env='MOZ_PROFILING',
|
||||
help='Set compile flags necessary for using sampling profilers '
|
||||
'(e.g. shark, perf)')
|
||||
|
||||
@depends('--enable-profiling', target)
|
||||
def profiling(value, target):
|
||||
if value:
|
||||
set_config('MOZ_PROFILING', '1')
|
||||
set_define('MOZ_PROFILING', '1')
|
||||
add_old_configure_assignment('MOZ_PROFILING', '1')
|
||||
|
||||
if target.kernel == 'WINNT' or (target.kernel == 'Linux' and
|
||||
target.os == 'GNU'):
|
||||
imply_option('--enable-vtune', reason='--enable-profiling')
|
||||
|
||||
|
||||
js_option('--enable-vtune', env='MOZ_VTUNE', help='Enable vtune profiling')
|
||||
|
||||
@depends('--enable-vtune')
|
||||
def vtune(value):
|
||||
if value:
|
||||
set_config('MOZ_VTUNE', '1')
|
||||
set_define('MOZ_VTUNE', '1')
|
||||
|
@ -871,14 +871,6 @@ AC_SUBST(HAVE_64BIT_BUILD)
|
||||
AC_LANG_RESTORE
|
||||
fi # COMPILE_ENVIRONMENT
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Use profiling compile flags
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(profiling,
|
||||
[ --enable-profiling Set compile flags necessary for using sampling profilers (e.g. shark, perf)],
|
||||
MOZ_PROFILING=1,
|
||||
MOZ_PROFILING= )
|
||||
|
||||
dnl ========================================================
|
||||
dnl System overrides of the defaults for host
|
||||
dnl ========================================================
|
||||
@ -2336,36 +2328,13 @@ AC_SUBST(ASMJS_MAY_USE_SIGNAL_HANDLERS)
|
||||
AC_SUBST(ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_OOB)
|
||||
AC_SUBST(ASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_UNALIGNED)
|
||||
|
||||
dnl ========================================================
|
||||
dnl jprof
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_JPROF"; then
|
||||
MOZ_PROFILING=1
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl instruments
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_INSTRUMENTS"; then
|
||||
MOZ_PROFILING=1
|
||||
LIBS="$LIBS -framework CoreFoundation"
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl callgrind
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_CALLGRIND"; then
|
||||
MOZ_PROFILING=1
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl vtune
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(vtune,
|
||||
[ --enable-vtune Enable vtune profiling. Implies --enable-profiling.],
|
||||
MOZ_VTUNE=1,
|
||||
MOZ_VTUNE= )
|
||||
|
||||
dnl ========================================================
|
||||
dnl JitSpew. Enabled by default in debug builds.
|
||||
dnl ========================================================
|
||||
@ -2387,22 +2356,6 @@ if test -n "$MOZ_DEBUG"; then
|
||||
AC_DEFINE(JS_DEBUG)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Profiling
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_PROFILING"; then
|
||||
AC_DEFINE(MOZ_PROFILING)
|
||||
|
||||
case "$OS_TARGET" in
|
||||
Linux) MOZ_VTUNE=1 ;;
|
||||
WINNT) MOZ_VTUNE=1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_VTUNE"; then
|
||||
AC_DEFINE(MOZ_VTUNE)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Zealous JavaScript GC
|
||||
dnl ========================================================
|
||||
@ -2772,8 +2725,6 @@ AC_SUBST(MOZ_DEBUG)
|
||||
AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST(MOZ_VTUNE)
|
||||
AC_SUBST(MOZ_PROFILING)
|
||||
AC_SUBST(LIBICONV)
|
||||
|
||||
AC_SUBST(ENABLE_TESTS)
|
||||
|
@ -1186,14 +1186,6 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Use profiling compile flags
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(profiling,
|
||||
[ --enable-profiling Set compile flags necessary for using sampling profilers (e.g. shark, perf)],
|
||||
MOZ_PROFILING=1,
|
||||
MOZ_PROFILING= )
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Use Valgrind
|
||||
dnl ========================================================
|
||||
@ -1209,39 +1201,6 @@ if test -n "$MOZ_VALGRIND"; then
|
||||
fi
|
||||
AC_SUBST(MOZ_VALGRIND)
|
||||
|
||||
dnl ========================================================
|
||||
dnl jprof
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_JPROF"; then
|
||||
MOZ_PROFILING=1
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl instruments
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_INSTRUMENTS"; then
|
||||
MOZ_PROFILING=1
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl callgrind
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_CALLGRIND"; then
|
||||
MOZ_PROFILING=1
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl vtune
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(vtune,
|
||||
[ --enable-vtune Enable vtune profiling. Implies --enable-profiling.],
|
||||
MOZ_VTUNE=1,
|
||||
MOZ_VTUNE= )
|
||||
if test -n "$MOZ_VTUNE"; then
|
||||
MOZ_PROFILING=1
|
||||
AC_DEFINE(MOZ_VTUNE)
|
||||
fi
|
||||
|
||||
# For profiling builds keep the symbol information
|
||||
if test "$MOZ_PROFILING" -a -z "$STRIP_FLAGS"; then
|
||||
case "$OS_TARGET" in
|
||||
@ -1263,14 +1222,6 @@ if test "$MOZ_DMD"; then
|
||||
|
||||
MOZ_MEMORY=1 # DMD enables jemalloc
|
||||
MOZ_REPLACE_MALLOC=1 # DMD enables replace-malloc
|
||||
MOZ_PROFILING=1 # DMD enables profiling
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Profiling
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_PROFILING"; then
|
||||
AC_DEFINE(MOZ_PROFILING)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
@ -7378,8 +7329,6 @@ AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST_SET(MOZ_EXTENSIONS)
|
||||
AC_SUBST(MOZ_VTUNE)
|
||||
AC_SUBST(MOZ_PROFILING)
|
||||
AC_SUBST(LIBICONV)
|
||||
AC_SUBST(MOZ_PLACES)
|
||||
AC_SUBST(MOZ_SOCIAL)
|
||||
|
@ -29,7 +29,7 @@ def jprof(value):
|
||||
if value:
|
||||
set_config('MOZ_JPROF', '1')
|
||||
set_define('MOZ_JPROF', '1')
|
||||
add_old_configure_assignment('MOZ_JPROF', '1')
|
||||
imply_option('--enable-profiling')
|
||||
|
||||
|
||||
@depends(target)
|
||||
@ -57,6 +57,7 @@ def dmd(value):
|
||||
set_config('MOZ_DMD', '1')
|
||||
set_define('MOZ_DMD', '1')
|
||||
add_old_configure_assignment('MOZ_DMD', '1')
|
||||
imply_option('--enable-profiling')
|
||||
|
||||
|
||||
# Javascript engine
|
||||
|
Loading…
Reference in New Issue
Block a user