Bug 902825 - Remove MOZ_CALLGRIND from mozilla-config.h; r?glandium
MozReview-Commit-ID: 4FxAcPq2bao
--- a/config/check_spidermonkey_style.py
+++ b/config/check_spidermonkey_style.py
@@ -63,16 +63,17 @@ included_inclnames_to_ignore = set([
'devtools/Instruments.h', # we ignore devtools/ in general
'double-conversion.h', # strange MFBT case
'javascript-trace.h', # generated in $OBJDIR if HAVE_DTRACE is defined
'frontend/ReservedWordsGenerated.h', # generated in $OBJDIR
'gc/StatsPhasesGenerated.h', # generated in $OBJDIR
'gc/StatsPhasesGenerated.cpp', # generated in $OBJDIR
'jscustomallocator.h', # provided by embedders; allowed to be missing
'js-config.h', # generated in $OBJDIR
+ 'mozconfig/MOZ_CALLGRIND.h',# generated by configure
'fdlibm.h', # fdlibm
'pratom.h', # NSPR
'prcvar.h', # NSPR
'prerror.h', # NSPR
'prinit.h', # NSPR
'prio.h', # NSPR
'private/pprio.h', # NSPR
'prlink.h', # NSPR
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -120,16 +120,17 @@ js_option('--enable-callgrind', env='MOZ
help='Enable callgrind profiling')
@depends('--enable-callgrind')
def callgrind(value):
if value:
return True
set_define('MOZ_CALLGRIND', callgrind)
+non_global('MOZ_CALLGRIND')
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
@@ -7,16 +7,18 @@
/* Profiling-related API */
#include "builtin/Profilers.h"
#include "mozilla/Sprintf.h"
#include <stdarg.h>
+#include "mozconfig/MOZ_CALLGRIND.h"
+
#ifdef MOZ_CALLGRIND
# include <valgrind/callgrind.h>
#endif
#ifdef __APPLE__
#ifdef MOZ_INSTRUMENTS
# include "devtools/Instruments.h"
#endif
--- 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
@@ -13,16 +13,18 @@
#include "mozilla/GuardObjects.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/mozalloc.h"
#include "mozilla/PodOperations.h"
#include "mozilla/ScopeExit.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() */