Bug 1321065 - Default to --enable-profiling for nightly milestones. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 30 Nov 2016 06:47:38 +0900
changeset 369827 800a887c705e02042a53d9093e9c4feb4a4c97cb
parent 369826 8c4f3476db84e9e779db63d6460a8dc6baa1c4f9
child 369828 512d5944a602d037a7c3455190a41f39aab37c9a
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1321065
milestone53.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
Bug 1321065 - Default to --enable-profiling for nightly milestones. r=gps
build/unix/mozconfig.asan
js/moz.configure
python/mozbuild/mozbuild/test/configure/test_moz_configure.py
--- a/build/unix/mozconfig.asan
+++ b/build/unix/mozconfig.asan
@@ -18,10 +18,11 @@ ac_add_options --enable-address-sanitize
 
 # Mandatory options required for ASan builds (both on Linux and Mac)
 export MOZ_DEBUG_SYMBOLS=1
 ac_add_options --enable-debug-symbols
 ac_add_options --disable-install-strip
 ac_add_options --disable-jemalloc
 ac_add_options --disable-crashreporter
 ac_add_options --disable-elf-hack
+ac_add_options --disable-profiling
 
 . "$topsrcdir/build/unix/mozconfig.stdcxx"
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -136,17 +136,21 @@ js_option('--enable-callgrind', env='MOZ
 @depends('--enable-callgrind')
 def callgrind(value):
     if value:
         return True
 
 set_define('MOZ_CALLGRIND', callgrind)
 imply_option('--enable-profiling', callgrind)
 
-js_option('--enable-profiling', env='MOZ_PROFILING',
+@depends(milestone, '--help')
+def enable_profiling(milestone, help):
+    return milestone.is_nightly
+
+js_option('--enable-profiling', env='MOZ_PROFILING', default=enable_profiling,
           help='Set compile flags necessary for using sampling profilers '
                '(e.g. shark, perf)')
 
 @depends('--enable-profiling')
 def profiling(value):
     if value:
         return True
 
--- a/python/mozbuild/mozbuild/test/configure/test_moz_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_moz_configure.py
@@ -26,25 +26,25 @@ class TestMozConfigure(BaseConfigureTest
             result = sandbox._value_for(sandbox['all_configure_options'])
             shell = mozpath.abspath('/bin/sh')
             return result.replace('CONFIG_SHELL=%s ' % shell, '')
 
         self.assertEquals('--enable-application=browser',
                           get_value_for(['--enable-application=browser']))
 
         self.assertEquals('--enable-application=browser '
-                          'MOZ_PROFILING=1',
+                          'MOZ_VTUNE=1',
                           get_value_for(['--enable-application=browser',
-                                         'MOZ_PROFILING=1']))
+                                         'MOZ_VTUNE=1']))
 
         value = get_value_for(
-            environ={'MOZ_PROFILING': '1'},
+            environ={'MOZ_VTUNE': '1'},
             mozconfig='ac_add_options --enable-project=js')
 
-        self.assertEquals('--enable-project=js MOZ_PROFILING=1',
+        self.assertEquals('--enable-project=js MOZ_VTUNE=1',
                           value)
 
         # --disable-js-shell is the default, so it's filtered out.
         self.assertEquals('--enable-application=browser',
                           get_value_for(['--enable-application=browser',
                                          '--disable-js-shell']))
 
         # Normally, --without-foo would be filtered out because that's the