[arm] Disable regexp tracer on ARM
authorVladimir Vukicevic <vladimir@pobox.com>
Sun, 09 Nov 2008 14:22:28 -0800
changeset 21547 e278ccc4fc41dcb434e1fc86820911c377c1a9ca
parent 21546 142fffb3dd1d93d68dcabebd9bd4b0d373779e5e
child 21548 9d4c8de84579657075eff652b694e188d4b6d5dd
push id3570
push uservladimir@mozilla.com
push dateMon, 10 Nov 2008 07:05:59 +0000
treeherdermozilla-central@9d3b769f920c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1b2pre
[arm] Disable regexp tracer on ARM
js/src/jsregexp.cpp
--- a/js/src/jsregexp.cpp
+++ b/js/src/jsregexp.cpp
@@ -61,16 +61,22 @@
 #include "jsnum.h"
 #include "jsobj.h"
 #include "jsopcode.h"
 #include "jsregexp.h"
 #include "jsscan.h"
 #include "jsscope.h"
 #include "jsstr.h"
 
+#ifdef NANOJIT_ARM
+// Something's broken with regexp tracing on ARM;
+// disable to get everything else limping along.
+#undef JS_TRACER
+#endif
+
 #ifdef JS_TRACER
 #include "jstracer.h"
 using namespace avmplus;
 using namespace nanojit;
 
 /* 
  * FIXME  Duplicated with jstracer.cpp, doing it this way for now
  *        to keep it private to files that need it. 
@@ -3644,21 +3650,31 @@ MatchRegExp(REGlobalData *gData, REMatch
 
     /* Run with native regexp if possible. */
     if (((fragment = JS_TRACE_MONITOR(gData->cx).reFragmento->getLoop(gData->regexp)) != NULL)
         && fragment->code()) {
         union { NIns *code; REMatchState* (FASTCALL *func)(void*, void*); } u;
         u.code = fragment->code();
         REMatchState *lr;
         gData->skipped = (ptrdiff_t) x->cp;
+
+        debug_only_v(printf("entering REGEXP trace at %s:%u@%u, code: %p\n",
+                            gData->cx->fp->script->filename,
+                            js_PCToLineNumber(gData->cx, gData->cx->fp->script, gData->cx->fp->regs->pc),
+                            gData->cx->fp->regs->pc - gData->cx->fp->script->code,
+                            fragment->code()););
+
 #if defined(JS_NO_FASTCALL) && defined(NANOJIT_IA32)
         SIMULATE_FASTCALL(lr, x, gData, u.func);
 #else
         lr = u.func(x, gData);
 #endif
+
+        debug_only_v(printf("leaving REGEXP trace\n"));
+
         gData->skipped = ((const jschar *) gData->skipped) - cp;
         return lr;
     }
 #endif
     /*
      * Have to include the position beyond the last character
      * in order to detect end-of-input/line condition.
      */
@@ -4604,17 +4620,19 @@ JS_DEFINE_TRCINFO_1(regexp_test,
 
 static JSFunctionSpec regexp_methods[] = {
 #if JS_HAS_TOSOURCE
     JS_FN(js_toSource_str,  regexp_toString,    0,0),
 #endif
     JS_FN(js_toString_str,  regexp_toString,    0,0),
     JS_FN("compile",        regexp_compile,     2,0),
     JS_FN("exec",           regexp_exec,        1,0),
+#ifdef JS_TRACER
     JS_TN("test",           regexp_test,        1,0, regexp_test_trcinfo),
+#endif
     JS_FS_END
 };
 
 static JSBool
 RegExp(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 {
     if (!(cx->fp->flags & JSFRAME_CONSTRUCTING)) {
         /*