Bug 857856 - Make --enable-debug --disable-optimize --disable-ion --disable-methodjit build work again. r=sstangl
authorJeff Walden <jwalden@mit.edu>
Thu, 04 Apr 2013 11:05:46 -0700
changeset 127698 04f2c0f0a220b409af15722eaec46304979f04ac
parent 127697 695eb5588304e963bd3587eb49e592646d7c8453
child 127699 489ab986ea69e1ba7746e383a267483db9d861ea
push id24512
push userryanvm@gmail.com
push dateFri, 05 Apr 2013 20:13:49 +0000
treeherdermozilla-central@139b6ba547fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs857856
milestone23.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 857856 - Make --enable-debug --disable-optimize --disable-ion --disable-methodjit build work again. r=sstangl
js/src/configure.in
js/src/methodjit/Logging.h
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -3266,17 +3266,17 @@ if test -z "$MOZ_DEBUG_FLAGS"; then
   MOZ_DEBUG_FLAGS="-g"
 fi
 
 MOZ_ARG_ENABLE_STRING(debug,
 [  --enable-debug[=DBG]    Enable building with developer debug info
                            (using compiler flags DBG)],
 [ if test "$enableval" != "no"; then
     MOZ_DEBUG=1
-    if test "$ENABLE_METHODJIT"; then
+    if test "$ENABLE_METHODJIT" -o "$ENABLE_YARR_JIT"; then
          # needs MethodJIT or YarrJIT
          ENABLE_METHODJIT_SPEW=1
     fi
     if test -n "$enableval" -a "$enableval" != "yes"; then
         MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
         _MOZ_DEBUG_FLAGS_SET=1
     fi
   else
--- a/js/src/methodjit/Logging.h
+++ b/js/src/methodjit/Logging.h
@@ -6,18 +6,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined jsjaeger_logging_h__
 #define jsjaeger_logging_h__
 
 #include "assembler/wtf/Platform.h"
 #include "prmjtime.h"
 
-#if defined(JS_METHODJIT) || ENABLE_YARR_JIT
-
 namespace js {
 
 #define JSPEW_CHAN_MAP(_)   \
     _(Abort)                \
     _(Scripts)              \
     _(Prof)                 \
     _(JSOps)                \
     _(Insns)                \
@@ -31,38 +29,44 @@ namespace js {
 
 enum JaegerSpewChannel {
 #define _(name) JSpew_##name,
     JSPEW_CHAN_MAP(_)
 #undef  _
     JSpew_Terminator
 };
 
-#if defined(DEBUG) && !defined(JS_METHODJIT_SPEW)
-# define JS_METHODJIT_SPEW
+#ifdef JS_METHODJIT_SPEW
+
+void JMCheckLogging();
+bool IsJaegerSpewChannelActive(JaegerSpewChannel channel);
+
+#ifdef __GNUC__
+void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
+#else
+void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...);
 #endif
 
-#if defined(JS_METHODJIT_SPEW)
+#else
 
-void JMCheckLogging();
+static inline void JMCheckLogging() {}
+static inline bool IsJaegerSpewChannelActive(JaegerSpewChannel channel) { return false; }
+static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) {}
+
+#endif // JS_METHODJIT_SPEW
+
+#if defined(JS_METHODJIT_SPEW)
 
 struct ConditionalLog {
     uint32_t oldBits;
     bool logging;
     ConditionalLog(bool logging);
     ~ConditionalLog();
 };
 
-bool IsJaegerSpewChannelActive(JaegerSpewChannel channel);
-#ifdef __GNUC__
-void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
-#else
-void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...);
-#endif
-
 struct Profiler {
     int64_t t_start;
     int64_t t_stop;
 
     static inline int64_t now() {
         return PRMJ_Now();
     }
 
@@ -78,27 +82,13 @@ struct Profiler {
         return uint32_t((t_stop - t_start) / PRMJ_USEC_PER_MSEC);
     }
 
     inline uint32_t time_us() {
         return uint32_t(t_stop - t_start);
     }
 };
 
-#else
+#endif // JS_METHODJIT_SPEW
 
-static inline bool IsJaegerSpewChannelActive(JaegerSpewChannel channel)
-{
-    return false;
-}
-
-static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...)
-{
-}
+} // namespace js
 
 #endif
-
-}
-
-#endif
-
-#endif
-