Bug 878019: IonMonkey: Do not force invalidation when hadFrequentBailouts is already set, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Sat, 01 Jun 2013 14:46:45 +0200
changeset 140818 c906ade40ac9e57ccd7d273c97a4e07b636fd6bd
parent 140817 c5a4248bf250d495b345a1bd0ddf3898269fef2d
child 140819 64fa18bb7800d0e81e3e21e363e5b0653b431ac6
push id3911
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 20:17:26 +0000
treeherdermozilla-aurora@7e26ca8db92b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs878019
milestone24.0a1
Bug 878019: IonMonkey: Do not force invalidation when hadFrequentBailouts is already set, r=jandem
js/src/ion/Bailouts.cpp
--- a/js/src/ion/Bailouts.cpp
+++ b/js/src/ion/Bailouts.cpp
@@ -153,17 +153,18 @@ ion::EnsureHasScopeObjects(JSContext *cx
 
 bool
 ion::CheckFrequentBailouts(JSContext *cx, JSScript *script)
 {
     // Invalidate if this script keeps bailing out without invalidation. Next time
     // we compile this script LICM will be disabled.
 
     if (script->hasIonScript() &&
-        script->ionScript()->numBailouts() >= js_IonOptions.frequentBailoutThreshold)
+        script->ionScript()->numBailouts() >= js_IonOptions.frequentBailoutThreshold &&
+        !script->hadFrequentBailouts)
     {
         script->hadFrequentBailouts = true;
 
         IonSpew(IonSpew_Invalidate, "Invalidating due to too many bailouts");
 
         if (!Invalidate(cx, script))
             return false;
     }