Bug 902825 - Remove MOZ_CALLGRIND from mozilla-config.h
MozReview-Commit-ID: 4FxAcPq2bao
--- 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() */