<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[197324] releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/197324">197324</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-02-29 02:02:16 -0800 (Mon, 29 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/197159">r197159</a> - [JSC] Be aggressive with OSR Entry to FTL if the DFG function was only used for OSR Entry itself
https://bugs.webkit.org/show_bug.cgi?id=154575

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2016-02-25
Reviewed by Filip Pizlo.

I noticed that imaging-gaussian-blur spends most of its
samples in DFG code despite executing most of the loop
iterations in FTL.

On this particular test, the main function is only entered
once and have a very heavy loop there. What happens is DFG
starts by compiling the full function in FTL. That takes about
8 to 10 milliseconds during which the DFG code makes very little
progress. The calls to triggerOSREntryNow() try to OSR Enter
for a while then finally start compiling something. By the time
the function is ready, we have wasted a lot of time in DFG code.

What this patch does is set a flag when a DFG function is entered.
If we try to triggerOSREntryNow() and the flag was never set,
we start compiling both the full function and the one for OSR Entry.

* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileEntryExecutionFlag):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
* dfg/DFGOperations.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan): Deleted.
* dfg/DFGPlan.h:
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreChangeLog">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGJITCodeh">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCode.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGJITCompilercpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGJITCompilerh">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGOperationscpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGOperations.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGPlancpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGPlanh">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGTierUpCheckInjectionPhasecpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-02-25  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [JSC] Be aggressive with OSR Entry to FTL if the DFG function was only used for OSR Entry itself
+        https://bugs.webkit.org/show_bug.cgi?id=154575
+
+        Reviewed by Filip Pizlo.
+
+        I noticed that imaging-gaussian-blur spends most of its
+        samples in DFG code despite executing most of the loop
+        iterations in FTL.
+
+        On this particular test, the main function is only entered
+        once and have a very heavy loop there. What happens is DFG
+        starts by compiling the full function in FTL. That takes about
+        8 to 10 milliseconds during which the DFG code makes very little
+        progress. The calls to triggerOSREntryNow() try to OSR Enter
+        for a while then finally start compiling something. By the time
+        the function is ready, we have wasted a lot of time in DFG code.
+
+        What this patch does is set a flag when a DFG function is entered.
+        If we try to triggerOSREntryNow() and the flag was never set,
+        we start compiling both the full function and the one for OSR Entry.
+
+        * dfg/DFGJITCode.h:
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::compileEntryExecutionFlag):
+        (JSC::DFG::JITCompiler::compile):
+        (JSC::DFG::JITCompiler::compileFunction):
+        * dfg/DFGJITCompiler.h:
+        * dfg/DFGOperations.cpp:
+        * dfg/DFGPlan.cpp:
+        (JSC::DFG::Plan::Plan): Deleted.
+        * dfg/DFGPlan.h:
+        * dfg/DFGTierUpCheckInjectionPhase.cpp:
+        (JSC::DFG::TierUpCheckInjectionPhase::run):
+
</ins><span class="cx"> 2016-02-26  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSC] Add the test for r197155
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGJITCodeh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCode.h (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCode.h        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCode.h        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -139,6 +139,7 @@
</span><span class="cx">     DFG::MinifiedGraph minifiedDFG;
</span><span class="cx"> #if ENABLE(FTL_JIT)
</span><span class="cx">     uint8_t nestedTriggerIsSet { 0 };
</span><ins>+    uint8_t neverExecutedEntry { 1 };
</ins><span class="cx">     UpperTierExecutionCounter tierUpCounter;
</span><span class="cx">     WriteBarrier&lt;CodeBlock&gt; m_osrEntryBlock;
</span><span class="cx">     unsigned osrEntryRetry;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGJITCompilercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -111,6 +111,14 @@
</span><span class="cx">     emitMaterializeTagCheckRegisters();    
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void JITCompiler::compileEntryExecutionFlag()
+{
+#if ENABLE(FTL_JIT)
+    if (m_graph.m_plan.canTierUpAndOSREnter)
+        store8(TrustedImm32(0), &amp;m_jitCode-&gt;neverExecutedEntry);
+#endif // ENABLE(FTL_JIT)
+}
+
</ins><span class="cx"> void JITCompiler::compileBody()
</span><span class="cx"> {
</span><span class="cx">     // We generate the speculative code path, followed by OSR exit code to return
</span><span class="lines">@@ -326,6 +334,7 @@
</span><span class="cx">     addPtr(TrustedImm32(m_graph.stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);
</span><span class="cx">     checkStackPointerAlignment();
</span><span class="cx">     compileSetupRegistersForEntry();
</span><ins>+    compileEntryExecutionFlag();
</ins><span class="cx">     compileBody();
</span><span class="cx">     setEndOfMainPath();
</span><span class="cx"> 
</span><span class="lines">@@ -392,6 +401,7 @@
</span><span class="cx">     checkStackPointerAlignment();
</span><span class="cx"> 
</span><span class="cx">     compileSetupRegistersForEntry();
</span><ins>+    compileEntryExecutionFlag();
</ins><span class="cx"> 
</span><span class="cx">     // === Function body code generation ===
</span><span class="cx">     m_speculative = std::make_unique&lt;SpeculativeJIT&gt;(*this);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGJITCompilerh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.h (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.h        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGJITCompiler.h        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -264,6 +264,7 @@
</span><span class="cx">     // Internal implementation to compile.
</span><span class="cx">     void compileEntry();
</span><span class="cx">     void compileSetupRegistersForEntry();
</span><ins>+    void compileEntryExecutionFlag();
</ins><span class="cx">     void compileBody();
</span><span class="cx">     void link(LinkBuffer&amp;);
</span><span class="cx">     
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGOperationscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGOperations.cpp (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGOperations.cpp        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGOperations.cpp        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -1430,21 +1430,26 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FTL_JIT)
</span><del>-static void triggerFTLReplacementCompile(VM* vm, CodeBlock* codeBlock, JITCode* jitCode)
</del><ins>+static bool shouldTriggerFTLCompile(CodeBlock* codeBlock, JITCode* jitCode)
</ins><span class="cx"> {
</span><span class="cx">     if (codeBlock-&gt;baselineVersion()-&gt;m_didFailFTLCompilation) {
</span><span class="cx">         if (Options::verboseOSR())
</span><span class="cx">             dataLog(&quot;Deferring FTL-optimization of &quot;, *codeBlock, &quot; indefinitely because there was an FTL failure.\n&quot;);
</span><span class="cx">         jitCode-&gt;dontOptimizeAnytimeSoon(codeBlock);
</span><del>-        return;
</del><ins>+        return false;
</ins><span class="cx">     }
</span><del>-    
-    if (!jitCode-&gt;checkIfOptimizationThresholdReached(codeBlock)) {
</del><ins>+
+    if (!codeBlock-&gt;hasOptimizedReplacement()
+        &amp;&amp; !jitCode-&gt;checkIfOptimizationThresholdReached(codeBlock)) {
</ins><span class="cx">         if (Options::verboseOSR())
</span><span class="cx">             dataLog(&quot;Choosing not to FTL-optimize &quot;, *codeBlock, &quot; yet.\n&quot;);
</span><del>-        return;
</del><ins>+        return false;
</ins><span class="cx">     }
</span><del>-    
</del><ins>+    return true;
+}
+
+static void triggerFTLReplacementCompile(VM* vm, CodeBlock* codeBlock, JITCode* jitCode)
+{
</ins><span class="cx">     Worklist::State worklistState;
</span><span class="cx">     if (Worklist* worklist = existingGlobalFTLWorklistOrNull()) {
</span><span class="cx">         worklistState = worklist-&gt;completeAllReadyPlansForVM(
</span><span class="lines">@@ -1477,6 +1482,10 @@
</span><span class="cx">     compile(
</span><span class="cx">         *vm, codeBlock-&gt;newReplacement(), codeBlock, FTLMode, UINT_MAX,
</span><span class="cx">         Operands&lt;JSValue&gt;(), ToFTLDeferredCompilationCallback::create());
</span><ins>+
+    // If we reached here, the counter has not be reset. Do that now.
+    jitCode-&gt;setOptimizationThresholdBasedOnCompilationResult(
+        codeBlock, CompilationDeferred);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void triggerTierUpNowCommon(ExecState* exec, bool inLoop)
</span><span class="lines">@@ -1501,7 +1510,8 @@
</span><span class="cx">     if (inLoop)
</span><span class="cx">         jitCode-&gt;nestedTriggerIsSet = 1;
</span><span class="cx"> 
</span><del>-    triggerFTLReplacementCompile(vm, codeBlock, jitCode);
</del><ins>+    if (shouldTriggerFTLCompile(codeBlock, jitCode))
+        triggerFTLReplacementCompile(vm, codeBlock, jitCode);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT_OPERATION triggerTierUpNow(ExecState* exec)
</span><span class="lines">@@ -1539,15 +1549,15 @@
</span><span class="cx">     // - If we don't have an FTL code block, then try to compile one.
</span><span class="cx">     // - If we do have an FTL code block, then try to enter for a while.
</span><span class="cx">     // - If we couldn't enter for a while, then trigger OSR entry.
</span><del>-    
-    triggerFTLReplacementCompile(vm, codeBlock, jitCode);
</del><span class="cx"> 
</span><del>-    if (!codeBlock-&gt;hasOptimizedReplacement())
-        return 0;
-    
-    if (jitCode-&gt;osrEntryRetry &lt; Options::ftlOSREntryRetryThreshold()) {
-        jitCode-&gt;osrEntryRetry++;
-        return 0;
</del><ins>+    if (!shouldTriggerFTLCompile(codeBlock, jitCode))
+        return nullptr;
+
+    if (!jitCode-&gt;neverExecutedEntry) {
+        triggerFTLReplacementCompile(vm, codeBlock, jitCode);
+
+        if (!codeBlock-&gt;hasOptimizedReplacement())
+            return nullptr;
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // It's time to try to compile code for OSR entry.
</span><span class="lines">@@ -1558,33 +1568,43 @@
</span><span class="cx">     } else
</span><span class="cx">         worklistState = Worklist::NotKnown;
</span><span class="cx">     
</span><del>-    if (worklistState == Worklist::Compiling)
-        return 0;
</del><ins>+    if (worklistState == Worklist::Compiling) {
+        jitCode-&gt;setOptimizationThresholdBasedOnCompilationResult(
+            codeBlock, CompilationDeferred);
+        return nullptr;
+    }
</ins><span class="cx">     
</span><span class="cx">     if (CodeBlock* entryBlock = jitCode-&gt;osrEntryBlock()) {
</span><span class="cx">         void* address = FTL::prepareOSREntry(
</span><span class="cx">             exec, codeBlock, entryBlock, bytecodeIndex, streamIndex);
</span><span class="cx">         if (address)
</span><span class="cx">             return static_cast&lt;char*&gt;(address);
</span><del>-        
</del><ins>+
+        if (jitCode-&gt;osrEntryRetry &lt; Options::ftlOSREntryRetryThreshold()) {
+            jitCode-&gt;osrEntryRetry++;
+            return nullptr;
+        }
+
</ins><span class="cx">         FTL::ForOSREntryJITCode* entryCode = entryBlock-&gt;jitCode()-&gt;ftlForOSREntry();
</span><span class="cx">         entryCode-&gt;countEntryFailure();
</span><span class="cx">         if (entryCode-&gt;entryFailureCount() &lt;
</span><del>-            Options::ftlOSREntryFailureCountForReoptimization())
-            return 0;
</del><ins>+            Options::ftlOSREntryFailureCountForReoptimization()) {
+            jitCode-&gt;optimizeSoon(codeBlock);
+            return nullptr;
+        }
</ins><span class="cx">         
</span><span class="cx">         // OSR entry failed. Oh no! This implies that we need to retry. We retry
</span><span class="cx">         // without exponential backoff and we only do this for the entry code block.
</span><span class="cx">         jitCode-&gt;clearOSREntryBlock();
</span><span class="cx">         jitCode-&gt;osrEntryRetry = 0;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (worklistState == Worklist::Compiled) {
</span><span class="cx">         // This means that compilation failed and we already set the thresholds.
</span><span class="cx">         if (Options::verboseOSR())
</span><span class="cx">             dataLog(&quot;Code block &quot;, *codeBlock, &quot; was compiled but it doesn't have an optimized replacement.\n&quot;);
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // We aren't compiling and haven't compiled anything for OSR entry. So, try to compile
</span><span class="lines">@@ -1596,10 +1616,16 @@
</span><span class="cx">     CompilationResult forEntryResult = compile(
</span><span class="cx">         *vm, replacementCodeBlock, codeBlock, FTLForOSREntryMode, bytecodeIndex,
</span><span class="cx">         mustHandleValues, ToFTLForOSREntryDeferredCompilationCallback::create());
</span><del>-    
-    if (forEntryResult != CompilationSuccessful)
-        return 0;
</del><span class="cx"> 
</span><ins>+    if (jitCode-&gt;neverExecutedEntry)
+        triggerFTLReplacementCompile(vm, codeBlock, jitCode);
+
+    if (forEntryResult != CompilationSuccessful) {
+        jitCode-&gt;setOptimizationThresholdBasedOnCompilationResult(
+            codeBlock, CompilationDeferred);
+        return nullptr;
+    }
+
</ins><span class="cx">     // It's possible that the for-entry compile already succeeded. In that case OSR
</span><span class="cx">     // entry will succeed unless we ran out of stack. It's not clear what we should do.
</span><span class="cx">     // We signal to try again after a while if that happens.
</span><span class="lines">@@ -1607,6 +1633,7 @@
</span><span class="cx">         exec, codeBlock, jitCode-&gt;osrEntryBlock(), bytecodeIndex, streamIndex);
</span><span class="cx">     return static_cast&lt;char*&gt;(address);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif // ENABLE(FTL_JIT)
</span><span class="cx"> 
</span><span class="cx"> } // extern &quot;C&quot;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGPlancpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.cpp (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.cpp        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.cpp        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -144,7 +144,6 @@
</span><span class="cx">     , inlineCallFrames(adoptRef(new InlineCallFrameSet()))
</span><span class="cx">     , identifiers(codeBlock)
</span><span class="cx">     , weakReferences(codeBlock)
</span><del>-    , willTryToTierUp(false)
</del><span class="cx">     , stage(Preparing)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGPlanh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.h (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.h        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGPlan.h        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -98,7 +98,8 @@
</span><span class="cx">     DesiredWeakReferences weakReferences;
</span><span class="cx">     DesiredTransitions transitions;
</span><span class="cx">     
</span><del>-    bool willTryToTierUp;
</del><ins>+    bool willTryToTierUp { false };
+    bool canTierUpAndOSREnter { false };
</ins><span class="cx"> 
</span><span class="cx">     enum Stage { Preparing, Compiling, Compiled, Ready, Cancelled };
</span><span class="cx">     Stage stage;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoredfgDFGTierUpCheckInjectionPhasecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp (197323 => 197324)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp        2016-02-29 09:53:38 UTC (rev 197323)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp        2016-02-29 10:02:16 UTC (rev 197324)
</span><span class="lines">@@ -71,6 +71,8 @@
</span><span class="cx">         NaturalLoops&amp; naturalLoops = *m_graph.m_naturalLoops;
</span><span class="cx"> 
</span><span class="cx">         HashSet&lt;const NaturalLoop*&gt; loopsContainingLoopHintWithoutOSREnter = findLoopsContainingLoopHintWithoutOSREnter(naturalLoops, level);
</span><ins>+
+        bool canTierUpAndOSREnter = false;
</ins><span class="cx">         
</span><span class="cx">         InsertionSet insertionSet(m_graph);
</span><span class="cx">         for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) {
</span><span class="lines">@@ -85,6 +87,7 @@
</span><span class="cx"> 
</span><span class="cx">                 NodeOrigin origin = node-&gt;origin;
</span><span class="cx">                 if (canOSREnterAtLoopHint(level, block, nodeIndex)) {
</span><ins>+                    canTierUpAndOSREnter = true;
</ins><span class="cx">                     const NaturalLoop* loop = naturalLoops.innerMostLoopOf(block);
</span><span class="cx">                     if (loop &amp;&amp; loopsContainingLoopHintWithoutOSREnter.contains(loop))
</span><span class="cx">                         insertionSet.insertNode(nodeIndex + 1, SpecNone, CheckTierUpWithNestedTriggerAndOSREnter, origin);
</span><span class="lines">@@ -103,7 +106,8 @@
</span><span class="cx">             
</span><span class="cx">             insertionSet.execute(block);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
+        m_graph.m_plan.canTierUpAndOSREnter = canTierUpAndOSREnter;
</ins><span class="cx">         m_graph.m_plan.willTryToTierUp = true;
</span><span class="cx">         return true;
</span><span class="cx"> #else // ENABLE(FTL_JIT)
</span></span></pre>
</div>
</div>

</body>
</html>