Commits

Anonymous committed ecec201

rebasing to tm tip

Comments (0)

Files changed (2)

patches/metric-lwact.diff

-diff -r 45b731a9d62a js/src/jsapi.cpp
---- a/js/src/jsapi.cpp	Tue Mar 03 18:59:28 2009 -0800
-+++ b/js/src/jsapi.cpp	Wed Mar 04 17:58:36 2009 -0800
-@@ -713,6 +713,9 @@ JS_PUBLIC_API(JSRuntime *)
+diff -r 0aaaa4eb75b6 js/src/jsapi.cpp
+--- a/js/src/jsapi.cpp	Thu Mar 19 09:41:58 2009 -0700
++++ b/js/src/jsapi.cpp	Thu Mar 19 15:11:50 2009 -0700
+@@ -720,6 +720,9 @@ JS_PUBLIC_API(JSRuntime *)
  JS_PUBLIC_API(JSRuntime *)
  JS_NewRuntime(uint32 maxbytes)
  {
      JSRuntime *rt;
  
  #ifdef DEBUG
-@@ -887,6 +890,9 @@ JS_PUBLIC_API(void)
+@@ -894,6 +897,9 @@ JS_PUBLIC_API(void)
  JS_PUBLIC_API(void)
  JS_ShutDown(void)
  {
  #ifdef JS_OPMETER
      extern void js_DumpOpMeters();
  
-diff -r 45b731a9d62a js/src/jsinterp.cpp
---- a/js/src/jsinterp.cpp	Tue Mar 03 18:59:28 2009 -0800
-+++ b/js/src/jsinterp.cpp	Wed Mar 04 17:58:36 2009 -0800
-@@ -2452,6 +2452,17 @@ JS_REQUIRES_STACK JSBool
+diff -r 0aaaa4eb75b6 js/src/jsinterp.cpp
+--- a/js/src/jsinterp.cpp	Thu Mar 19 09:41:58 2009 -0700
++++ b/js/src/jsinterp.cpp	Thu Mar 19 15:11:50 2009 -0700
+@@ -2477,9 +2477,22 @@ JS_STATIC_ASSERT(JSOP_INCNAME_LENGTH == 
+ JS_STATIC_ASSERT(JSOP_INCNAME_LENGTH == JSOP_NAMEINC_LENGTH);
+ JS_STATIC_ASSERT(JSOP_INCNAME_LENGTH == JSOP_NAMEDEC_LENGTH);
+ 
++#define XXX
++
  JS_REQUIRES_STACK JSBool
  js_Interpret(JSContext *cx)
  {
 +#ifdef XXX
 +    unsigned long long t0 = 0;
-+    if (!strcmp(cx->fp->script->filename, "http://www2.webkit.org/perf/sunspider-0.9/access-nsieve.html")) {
++    if (!strcmp(cx->fp->script->filename, "http://www2.webkit.org/perf/sunspider-0.9/crypto-aes.html")) {
 +        t0 = rdtsc();
 +        printf("js_Interpret %p %s:%u %llu\n", cx, cx->fp->script->filename,
 +               cx->fp->regs ? js_FramePCToLineNumber(cx, cx->fp): 0, t0);
      JSRuntime *rt;
      JSStackFrame *fp;
      JSScript *script;
-@@ -2653,6 +2664,8 @@ js_Interpret(JSContext *cx)
+@@ -2681,6 +2694,8 @@ js_Interpret(JSContext *cx)
          if (TRACING_ENABLED(cx)) {                                            \
              if (js_MonitorLoopEdge(cx, inlineCallCount)) {                    \
                  JS_ASSERT(TRACE_RECORDER(cx));                                \
                  ENABLE_INTERRUPTS();                                          \
              }                                                                 \
              fp = cx->fp;                                                      \
-@@ -2860,6 +2873,8 @@ js_Interpret(JSContext *cx)
+@@ -2890,6 +2905,8 @@ js_Interpret(JSContext *cx)
  #endif /* !JS_TRACER */
  
  #if JS_THREADED_INTERP
              jumpTable = moreInterrupts ? interruptJumpTable : normalJumpTable;
              JS_EXTENSION_(goto *normalJumpTable[op]);
  #else
-@@ -7169,6 +7184,13 @@ js_Interpret(JSContext *cx)
+@@ -7188,6 +7205,13 @@ js_Interpret(JSContext *cx)
          }
      }
  #endif
      return ok;
  
    atom_not_defined:
-diff -r 45b731a9d62a js/src/jstracer.cpp
---- a/js/src/jstracer.cpp	Tue Mar 03 18:59:28 2009 -0800
-+++ b/js/src/jstracer.cpp	Wed Mar 04 17:58:36 2009 -0800
-@@ -72,6 +72,8 @@
+diff -r 0aaaa4eb75b6 js/src/jstracer.cpp
+--- a/js/src/jstracer.cpp	Thu Mar 19 09:41:58 2009 -0700
++++ b/js/src/jstracer.cpp	Thu Mar 19 15:11:50 2009 -0700
+@@ -75,6 +75,8 @@
  
  #include "jsautooplen.h"        // generated headers last
  #include "imacros.c.out"
  
  /* Never use JSVAL_IS_BOOLEAN because it restricts the value (true, false) and
     the type. What you want to use is JSVAL_TAG(x) == JSVAL_BOOLEAN and then
-@@ -2455,6 +2457,8 @@ JS_REQUIRES_STACK void
+@@ -2497,6 +2499,8 @@ JS_REQUIRES_STACK void
  JS_REQUIRES_STACK void
  TraceRecorder::compile(JSTraceMonitor* tm)
  {
      Fragmento* fragmento = tm->fragmento;
      if (treeInfo->maxNativeStackSlots >= MAX_NATIVE_STACK_SLOTS) {
          debug_only_v(printf("Blacklist: excessive stack use.\n"));
-@@ -3863,6 +3867,8 @@ js_ExecuteTree(JSContext* cx, Fragment* 
+@@ -3899,6 +3903,8 @@ js_ExecuteTree(JSContext* cx, Fragment* 
  js_ExecuteTree(JSContext* cx, Fragment* f, uintN& inlineCallCount,
                 VMSideExit** innermostNestedGuardp)
  {
      JS_ASSERT(f->code() && f->vmprivate);
      JS_ASSERT(cx->builtinStatus == 0);
  
-@@ -3952,11 +3958,14 @@ js_ExecuteTree(JSContext* cx, Fragment* 
+@@ -3986,11 +3992,14 @@ js_ExecuteTree(JSContext* cx, Fragment* 
  
      debug_only(fflush(NULL);)
      GuardRecord* rec;
 +    {
 +        mon_StateObj _mso_n(S_NATIVE);
  #if defined(JS_NO_FASTCALL) && defined(NANOJIT_IA32)
--    SIMULATE_FASTCALL(rec, &state, NULL, u.func);
-+        SIMULATE_FASTCALL(rec, &state, NULL, u.func);
+-    SIMULATE_FASTCALL(rec, state, NULL, u.func);
++        SIMULATE_FASTCALL(rec, state, NULL, u.func);
  #else
--    rec = u.func(&state, NULL);
+-    rec = u.func(state, NULL);
 -#endif
-+        rec = u.func(&state, NULL);
++        rec = u.func(state, NULL);
 +#endif
 +    }
      VMSideExit* lr = (VMSideExit*)rec->exit;
  
      AUDIT(traceTriggered);
-@@ -4194,6 +4203,8 @@ JS_REQUIRES_STACK bool
+@@ -4228,6 +4237,8 @@ JS_REQUIRES_STACK bool
  JS_REQUIRES_STACK bool
  js_MonitorLoopEdge(JSContext* cx, uintN& inlineCallCount)
  {
      JSTraceMonitor* tm = &JS_TRACE_MONITOR(cx);
  
      /* Is the recorder currently active? */
-@@ -4213,14 +4224,17 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
+@@ -4247,14 +4258,17 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
           * the interpreter and do not attempt to trigger or record a new tree at this
           * location.
           */
          return false; /* Out of memory, don't try to record now. */
      }
  
-@@ -4233,8 +4247,10 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
+@@ -4267,8 +4281,10 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
          js_FlushJITCache(cx);
  
      /* Do not enter the JIT code with a pending operation callback. */
      
      jsbytecode* pc = cx->fp->regs->pc;
  
-@@ -4244,6 +4260,7 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
+@@ -4278,6 +4294,7 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
  
      if (!f) {
          js_FlushJITCache(cx);
          return false;
      }
  
-@@ -4251,11 +4268,16 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
+@@ -4285,11 +4302,16 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
         activate any trees so, start compiling. */
      if (!f->code() && !f->peer) {
      record:
      }
  
      debug_only_v(printf("Looking for compat peer %d@%d, from %p (ip: %p)\n",
-@@ -4271,6 +4293,7 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
+@@ -4305,6 +4327,7 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
             expensive. This must be a rather type-unstable loop. */
          debug_only_v(printf("Blacklisted: too many peer trees.\n");)
          js_Blacklist(f->root);
          return false;
      }
  
-@@ -4278,24 +4301,45 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
+@@ -4312,24 +4335,45 @@ js_MonitorLoopEdge(JSContext* cx, uintN&
      VMSideExit* innermostNestedGuard = NULL;
  
      lr = js_ExecuteTree(cx, match, inlineCallCount, &innermostNestedGuard);
          return false;
      }
  }
-diff -r 45b731a9d62a js/src/jstracer.h
---- a/js/src/jstracer.h	Tue Mar 03 18:59:28 2009 -0800
-+++ b/js/src/jstracer.h	Wed Mar 04 17:58:36 2009 -0800
-@@ -649,6 +649,80 @@ extern JSObject *
+diff -r 0aaaa4eb75b6 js/src/jstracer.h
+--- a/js/src/jstracer.h	Thu Mar 19 09:41:58 2009 -0700
++++ b/js/src/jstracer.h	Thu Mar 19 15:11:50 2009 -0700
+@@ -648,6 +648,80 @@ extern JSObject *
  extern JSObject *
  js_GetBuiltinFunction(JSContext *cx, uintN index);
  

scripts/binlog.py

     h = cls()
 
     for s, r, t in ts:
-        #if t < 187809742979452: continue
-        #if t > 187810006037049: break
+        #if t < 1160909415950669-877953307: continue
+        #if t > 1160909415950669: break
         if s:
             h.enter(s, r, t)
         else:
     #assert sum(h.state_summary) == ts[-1][2] - ts[0][2]
     return h
 
+reason_cache = {}
+
 def getreason(hist, i):
+    ans = None
     while True:
         p0 = hist.timeline[i]
         r = p0.r
         if r:
-            return reasons[r]
+            ans = reasons[r]
+            break
 
         if not p0.s0:
-            return 'start'
+            ans = 'start'
+            break
 
         name = states[p0.s0]
         if name != 'interpret':
-            return name
+            ans = name
+            break
 
         i -= 1
+        r = reason_cache.get(i)
+        if r:
+            ans = r
+            break
+    reason_cache[i] = ans
+    return ans
 
 def summary(hist):
     ep = 0       # estimated progress