http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK1%20(Tests)/r162690%20(2192)/results.html Another internal method causing recompilation within a JS stack: window.internals.setJavaScriptProfilingEnabled(bool) This Enables/Disables the Profiler which now recompiles synchronously within a JS stack. I can add a timer here in window.internals and do this after a loop. But its looking more and more like it might be better if the VM handled recompiling when appropriate instead of us trying to avoid calling it within a JS stack.
OK.
Created attachment 222128 [details] [PATCH] Naive Approach - Does not work running multiple tests The naive approach of just making window.internals.setJavaScriptProfilerEnabled did not work. shell> Tools/Scripts/run-webkit-tests --debug fast/profiler/anonymous-event-handler.html PASS shell> Tools/Scripts/run-webkit-tests --debug fast/profiler/anonymous-event-handler.html --iterations=2 FAILs I could spend some more time looking into this, but we've already tried to work around it twice. I think it might be better for the JSC VM to handle recompiling when appropriate. No timers involved.
> The naive approach of just making window.internals.setJavaScriptProfilerEnabled did not work. window.internals.setJavaScriptProfilerEnabled *use a timer* did not work.
Created attachment 222131 [details] [PATCH] Proposed Fix - Let the VM manage recompilation Suggestions on how I should measure the performance of this?
Comment on attachment 222131 [details] [PATCH] Proposed Fix - Let the VM manage recompilation View in context: https://bugs.webkit.org/attachment.cgi?id=222131&action=review > Source/JavaScriptCore/runtime/VMEntryScope.cpp:66 > + if (UNLIKELY(m_recompilationNeeded)) { You can't do this unless .entryScope is null. Otherwise you have to set the parent's entry scope recompile flag.
Comment on attachment 222131 [details] [PATCH] Proposed Fix - Let the VM manage recompilation View in context: https://bugs.webkit.org/attachment.cgi?id=222131&action=review >> Source/JavaScriptCore/runtime/VMEntryScope.cpp:66 >> + if (UNLIKELY(m_recompilationNeeded)) { > > You can't do this unless .entryScope is null. Otherwise you have to set the parent's entry scope recompile flag. The next line ASSERTs that.
Created attachment 222134 [details] [PATCH] Proposed Fix - Let VM manage recompilation More straightforward approach, instead of just adjusting the topEntryScope.
Landed <http://trac.webkit.org/changeset/162720>.