Bug 902825 - Remove MOZ_CALLGRIND from mozilla-config.h draft
authorMike Shal <mshal@mozilla.com>
Tue, 17 Jan 2017 11:17:03 -0500
changeset 568939 8cea32434901d5d5d9878963526c8bb2573b88e7
parent 568938 d4a2b2686a0647fc9b9ca578f2a67030e7a00f86
child 626068 9acdd6e9bb401ff98a15dbb94a259bf7dc10c822
push id56025
push userbmo:mshal@mozilla.com
push dateWed, 26 Apr 2017 19:06:07 +0000
bugs902825
milestone55.0a1
Bug 902825 - Remove MOZ_CALLGRIND from mozilla-config.h MozReview-Commit-ID: 4FxAcPq2bao
js/moz.configure
js/src/builtin/Profilers.cpp
js/src/builtin/Profilers.h
js/src/shell/js.cpp
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -120,17 +120,17 @@ imply_option('--enable-profiling', instr
 js_option('--enable-callgrind', env='MOZ_CALLGRIND',
           help='Enable callgrind profiling')
 
 @depends('--enable-callgrind')
 def callgrind(value):
     if value:
         return True
 
-set_define('MOZ_CALLGRIND', callgrind)
+set_define('MOZ_CALLGRIND', callgrind, mozconfig_header=True)
 imply_option('--enable-profiling', callgrind)
 
 @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 '
--- a/js/src/builtin/Profilers.cpp
+++ b/js/src/builtin/Profilers.cpp
@@ -5,16 +5,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Profiling-related API */
 
 #include "builtin/Profilers.h"
 
 #include "mozilla/Sprintf.h"
 
+#include "mozconfig/MOZ_CALLGRIND.h"
+
 #include <stdarg.h>
 
 #ifdef MOZ_CALLGRIND
 # include <valgrind/callgrind.h>
 #endif
 
 #ifdef __APPLE__
 #ifdef MOZ_INSTRUMENTS
--- a/js/src/builtin/Profilers.h
+++ b/js/src/builtin/Profilers.h
@@ -8,16 +8,18 @@
  * Functions for controlling profilers from within JS: Valgrind, Perf,
  * Shark, etc.
  */
 #ifndef builtin_Profilers_h
 #define builtin_Profilers_h
 
 #include "jstypes.h"
 
+#include "mozconfig/MOZ_CALLGRIND.h"
+
 #ifdef _MSC_VER
 typedef int pid_t;
 #else
 #include <unistd.h>
 #endif
 
 /**
  * Start any profilers that are available and have been configured on for this
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -14,16 +14,18 @@
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/mozalloc.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/SizePrintfMacros.h"
 #include "mozilla/Sprintf.h"
 #include "mozilla/TimeStamp.h"
 
+#include "mozconfig/MOZ_CALLGRIND.h"
+
 #ifdef XP_WIN
 # include <direct.h>
 # include <process.h>
 #endif
 #include <errno.h>
 #include <fcntl.h>
 #if defined(XP_WIN)
 # include <io.h>     /* for isatty() */