Blacklist a trace if we hit a global shape mismatch. This makes us suck less on date-format-tofte until we find a way to fix the property cache misses.
authorAndreas Gal <gal@mozilla.com>
Wed, 13 Aug 2008 03:54:54 -0700
changeset 18128 1b635268db9105907d457b5e8e57f7db363b55a3
parent 18127 96f01bb77cf0eebe2ed687345dddb5e27ce1e7a1
child 18129 c4a4d3b58841c608a166665744d8dd75f4dc88c1
push id1452
push usershaver@mozilla.com
push dateFri, 22 Aug 2008 00:08:22 +0000
treeherdermozilla-central@d13bb0868596 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a2pre
Blacklist a trace if we hit a global shape mismatch. This makes us suck less on date-format-tofte until we find a way to fix the property cache misses.
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1684,16 +1684,17 @@ js_ExecuteTree(JSContext* cx, Fragment* 
 
     /* execute previously recorded trace */
     TreeInfo* ti = (TreeInfo*)f->vmprivate;
     JSObject* globalObj = JS_GetGlobalForObject(cx, cx->fp->scopeChain);
     if (OBJ_SCOPE(globalObj)->shape != ti->globalShape) {
         AUDIT(globalShapeMismatchAtEntry);
         debug_only(printf("global shape mismatch, flushing tree.\n"));
         js_TrashTree(cx, f);
+        f->blacklist();
         return NULL;
     }
 
     unsigned ngslots = ti->globalSlots.length();
     uint16* gslots = ti->globalSlots.data();
     unsigned globalFrameSize = STOBJ_NSLOTS(globalObj);
     double* global = (double*)alloca((globalFrameSize+1) * sizeof(double));
     debug_only(*(uint64*)&global[globalFrameSize] = 0xdeadbeefdeadbeefLL;)