Bug 112838 - The DFG should be able to tier-up and OSR enter into the FTL
Summary: The DFG should be able to tier-up and OSR enter into the FTL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
: 113625 (view as bug list)
Depends on: 120326 120453 120486 120489 120567
Blocks: 112836
  Show dependency treegraph
 
Reported: 2013-03-20 13:42 PDT by Filip Pizlo
Modified: 2013-09-03 23:25 PDT (History)
17 users (show)

See Also:


Attachments
it begins... (4.03 KB, patch)
2013-08-29 17:01 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
more things (19.08 KB, patch)
2013-08-29 19:35 PDT, Filip Pizlo
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
I think I know what I'm doing now (32.08 KB, patch)
2013-08-30 12:36 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
it's sort of getting there (37.50 KB, patch)
2013-08-30 13:23 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
slowly but surely! (45.00 KB, patch)
2013-08-30 16:20 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
it's getting fun. (55.78 KB, patch)
2013-08-30 19:39 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
even more things (64.02 KB, patch)
2013-08-31 11:33 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
getting there (84.73 KB, patch)
2013-08-31 14:44 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
getting close (107.33 KB, patch)
2013-08-31 15:48 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
starting to compile (179.75 KB, patch)
2013-09-02 12:53 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
builds with !ENABLE(FTL_JIT) (179.79 KB, patch)
2013-09-02 13:03 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
it builds (182.27 KB, patch)
2013-09-02 13:54 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
JSC just did an OSR-entry hot loop transfer from the DFG to the FTL. (190.96 KB, patch)
2013-09-02 15:17 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
it makes imaging-gaussian-blur faster (196.00 KB, patch)
2013-09-02 22:14 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (150.81 KB, patch)
2013-09-03 10:15 PDT, Filip Pizlo
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
the patch (153.61 KB, patch)
2013-09-03 10:38 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (156.18 KB, patch)
2013-09-03 13:54 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (157.13 KB, patch)
2013-09-03 15:20 PDT, Filip Pizlo
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2013-03-20 13:42:55 PDT
This also means that DFG code block jettisoning logic, and the CodeBlock's ability to keep a linked list of alternate compilations of an executable, should all be aware of the fact that there are two kinds of DFG compilation - the lesser kind and the better kind (or whatever we end up calling it).
Comment 1 Filip Pizlo 2013-08-26 14:48:29 PDT
*** Bug 113625 has been marked as a duplicate of this bug. ***
Comment 2 Filip Pizlo 2013-08-29 17:01:28 PDT
Created attachment 210049 [details]
it begins...
Comment 3 Filip Pizlo 2013-08-29 19:35:28 PDT
Created attachment 210058 [details]
more things
Comment 4 Early Warning System Bot 2013-08-30 03:00:51 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1626877
Comment 5 Early Warning System Bot 2013-08-30 03:02:44 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/1648038
Comment 6 EFL EWS Bot 2013-08-30 03:16:17 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/1651045
Comment 7 Build Bot 2013-08-30 03:23:14 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1650047
Comment 8 Build Bot 2013-08-30 03:41:30 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/1646046
Comment 9 EFL EWS Bot 2013-08-30 03:56:14 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/1648044
Comment 10 kov's GTK+ EWS bot 2013-08-30 04:14:16 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/1582471
Comment 11 kov's GTK+ EWS bot 2013-08-30 05:34:47 PDT
Comment on attachment 210058 [details]
more things

Attachment 210058 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/1648077
Comment 12 Filip Pizlo 2013-08-30 12:36:33 PDT
Created attachment 210150 [details]
I think I know what I'm doing now
Comment 13 Filip Pizlo 2013-08-30 13:23:50 PDT
Created attachment 210154 [details]
it's sort of getting there
Comment 14 Filip Pizlo 2013-08-30 16:20:54 PDT
Created attachment 210174 [details]
slowly but surely!
Comment 15 Filip Pizlo 2013-08-30 19:39:42 PDT
Created attachment 210180 [details]
it's getting fun.
Comment 16 Filip Pizlo 2013-08-31 11:33:11 PDT
Created attachment 210199 [details]
even more things
Comment 17 Filip Pizlo 2013-08-31 14:44:18 PDT
Created attachment 210216 [details]
getting there
Comment 18 Filip Pizlo 2013-08-31 15:48:15 PDT
Created attachment 210219 [details]
getting close

I think I need to rethink jettisoning, if I want any of this to make sense.
Comment 19 Filip Pizlo 2013-09-02 12:53:25 PDT
Created attachment 210307 [details]
starting to compile

This includes the patch for https://bugs.webkit.org/show_bug.cgi?id=120567 because I need that and it hasn't been reviewed yet.
Comment 20 Filip Pizlo 2013-09-02 13:03:39 PDT
Created attachment 210308 [details]
builds with !ENABLE(FTL_JIT)
Comment 21 Filip Pizlo 2013-09-02 13:54:42 PDT
Created attachment 210309 [details]
it builds
Comment 22 Filip Pizlo 2013-09-02 15:17:22 PDT
Created attachment 210312 [details]
JSC just did an OSR-entry hot loop transfer from the DFG to the FTL.
Comment 23 Filip Pizlo 2013-09-02 15:18:07 PDT
(In reply to comment #22)
> Created an attachment (id=210312) [details]
> JSC just did an OSR-entry hot loop transfer from the DFG to the FTL.

This would basically be ready for review, except that it depends on and includes https://bugs.webkit.org/show_bug.cgi?id=120567, which hasn't been reviewed or landed yet.
Comment 24 Filip Pizlo 2013-09-02 22:14:57 PDT
Created attachment 210322 [details]
it makes imaging-gaussian-blur faster

Turns out I had to rethink how OSR entrypoint creation works.  I'm not sure I'm 100% happy with it but it does the job.
Comment 25 Filip Pizlo 2013-09-03 10:15:23 PDT
Created attachment 210381 [details]
the patch

Rebased.  I think it's ready.
Comment 26 WebKit Commit Bot 2013-09-03 10:17:11 PDT
Attachment 210381 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/js/regress/script-tests/marsaglia.js', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj', u'Source/JavaScriptCore/bytecode/CodeBlock.cpp', u'Source/JavaScriptCore/bytecode/CodeBlock.h', u'Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h', u'Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp', u'Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGClobberize.h', u'Source/JavaScriptCore/dfg/DFGDriver.cpp', u'Source/JavaScriptCore/dfg/DFGDriver.h', u'Source/JavaScriptCore/dfg/DFGFixupPhase.cpp', u'Source/JavaScriptCore/dfg/DFGGraph.cpp', u'Source/JavaScriptCore/dfg/DFGGraph.h', u'Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp', u'Source/JavaScriptCore/dfg/DFGJITCode.cpp', u'Source/JavaScriptCore/dfg/DFGJITCode.h', u'Source/JavaScriptCore/dfg/DFGJITFinalizer.cpp', u'Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.h', u'Source/JavaScriptCore/dfg/DFGNode.h', u'Source/JavaScriptCore/dfg/DFGNodeType.h', u'Source/JavaScriptCore/dfg/DFGOSREntry.cpp', u'Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.h', u'Source/JavaScriptCore/dfg/DFGOperations.cpp', u'Source/JavaScriptCore/dfg/DFGOperations.h', u'Source/JavaScriptCore/dfg/DFGPlan.cpp', u'Source/JavaScriptCore/dfg/DFGPlan.h', u'Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp', u'Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGSafeToExecute.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp', u'Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp', u'Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.h', u'Source/JavaScriptCore/dfg/DFGToFTLDeferredCompilationCallback.cpp', u'Source/JavaScriptCore/dfg/DFGToFTLDeferredCompilationCallback.h', u'Source/JavaScriptCore/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp', u'Source/JavaScriptCore/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h', u'Source/JavaScriptCore/dfg/DFGWorklist.cpp', u'Source/JavaScriptCore/dfg/DFGWorklist.h', u'Source/JavaScriptCore/ftl/FTLCapabilities.cpp', u'Source/JavaScriptCore/ftl/FTLCapabilities.h', u'Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.cpp', u'Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.h', u'Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp', u'Source/JavaScriptCore/ftl/FTLLink.cpp', u'Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp', u'Source/JavaScriptCore/ftl/FTLOSREntry.cpp', u'Source/JavaScriptCore/ftl/FTLOSREntry.h', u'Source/JavaScriptCore/ftl/FTLOutput.h', u'Source/JavaScriptCore/ftl/FTLState.cpp', u'Source/JavaScriptCore/interpreter/Register.h', u'Source/JavaScriptCore/jit/JIT.cpp', u'Source/JavaScriptCore/jit/JITCode.cpp', u'Source/JavaScriptCore/jit/JITCode.h', u'Source/JavaScriptCore/jit/JITStubs.cpp', u'Source/JavaScriptCore/runtime/Executable.cpp', u'Source/JavaScriptCore/runtime/Options.h', u'Source/JavaScriptCore/runtime/VM.cpp', u'Source/JavaScriptCore/runtime/VM.h']" exit_code: 1
Source/JavaScriptCore/dfg/DFGJITCode.h:105:  The parameter name "exec" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:31:  Alphabetical sorting problem.  [build/include_order] [4]
Source/JavaScriptCore/ftl/FTLState.cpp:34:  Alphabetical sorting problem.  [build/include_order] [4]
Source/JavaScriptCore/dfg/DFGOperations.cpp:2132:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/JavaScriptCore/ftl/FTLOSREntry.cpp:81:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/JavaScriptCore/ftl/FTLOSREntry.cpp:89:  Declaration has space between type name and * in void *result  [whitespace/declaration] [3]
Total errors found: 6 in 61 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 27 Early Warning System Bot 2013-09-03 10:23:19 PDT
Comment on attachment 210381 [details]
the patch

Attachment 210381 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1697032
Comment 28 Early Warning System Bot 2013-09-03 10:26:08 PDT
Comment on attachment 210381 [details]
the patch

Attachment 210381 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/1693306
Comment 29 Filip Pizlo 2013-09-03 10:38:19 PDT
Created attachment 210384 [details]
the patch

Style and build fixes.
Comment 30 WebKit Commit Bot 2013-09-03 10:42:18 PDT
Attachment 210384 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/js/regress/script-tests/marsaglia.js', u'Source/JavaScriptCore/CMakeLists.txt', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/GNUmakefile.list.am', u'Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj', u'Source/JavaScriptCore/Target.pri', u'Source/JavaScriptCore/bytecode/CodeBlock.cpp', u'Source/JavaScriptCore/bytecode/CodeBlock.h', u'Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h', u'Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp', u'Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGClobberize.h', u'Source/JavaScriptCore/dfg/DFGDriver.cpp', u'Source/JavaScriptCore/dfg/DFGDriver.h', u'Source/JavaScriptCore/dfg/DFGFixupPhase.cpp', u'Source/JavaScriptCore/dfg/DFGGraph.cpp', u'Source/JavaScriptCore/dfg/DFGGraph.h', u'Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp', u'Source/JavaScriptCore/dfg/DFGJITCode.cpp', u'Source/JavaScriptCore/dfg/DFGJITCode.h', u'Source/JavaScriptCore/dfg/DFGJITFinalizer.cpp', u'Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.h', u'Source/JavaScriptCore/dfg/DFGNode.h', u'Source/JavaScriptCore/dfg/DFGNodeType.h', u'Source/JavaScriptCore/dfg/DFGOSREntry.cpp', u'Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.h', u'Source/JavaScriptCore/dfg/DFGOperations.cpp', u'Source/JavaScriptCore/dfg/DFGOperations.h', u'Source/JavaScriptCore/dfg/DFGPlan.cpp', u'Source/JavaScriptCore/dfg/DFGPlan.h', u'Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp', u'Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGSafeToExecute.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp', u'Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp', u'Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.h', u'Source/JavaScriptCore/dfg/DFGToFTLDeferredCompilationCallback.cpp', u'Source/JavaScriptCore/dfg/DFGToFTLDeferredCompilationCallback.h', u'Source/JavaScriptCore/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp', u'Source/JavaScriptCore/dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h', u'Source/JavaScriptCore/dfg/DFGWorklist.cpp', u'Source/JavaScriptCore/dfg/DFGWorklist.h', u'Source/JavaScriptCore/ftl/FTLCapabilities.cpp', u'Source/JavaScriptCore/ftl/FTLCapabilities.h', u'Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.cpp', u'Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.h', u'Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp', u'Source/JavaScriptCore/ftl/FTLLink.cpp', u'Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp', u'Source/JavaScriptCore/ftl/FTLOSREntry.cpp', u'Source/JavaScriptCore/ftl/FTLOSREntry.h', u'Source/JavaScriptCore/ftl/FTLOutput.h', u'Source/JavaScriptCore/ftl/FTLState.cpp', u'Source/JavaScriptCore/interpreter/Register.h', u'Source/JavaScriptCore/jit/JIT.cpp', u'Source/JavaScriptCore/jit/JITCode.cpp', u'Source/JavaScriptCore/jit/JITCode.h', u'Source/JavaScriptCore/jit/JITStubs.cpp', u'Source/JavaScriptCore/runtime/Executable.cpp', u'Source/JavaScriptCore/runtime/Options.h', u'Source/JavaScriptCore/runtime/VM.cpp', u'Source/JavaScriptCore/runtime/VM.h']" exit_code: 1
Source/JavaScriptCore/ftl/FTLOSREntry.cpp:89:  Declaration has space between type name and * in void *result  [whitespace/declaration] [3]
Total errors found: 1 in 64 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 31 Filip Pizlo 2013-09-03 13:54:59 PDT
Created attachment 210408 [details]
the patch
Comment 32 Filip Pizlo 2013-09-03 15:20:39 PDT
Created attachment 210414 [details]
the patch
Comment 33 Filip Pizlo 2013-09-03 16:30:06 PDT
Comment on attachment 210414 [details]
the patch

r=MarkH (reviewed in person)
Comment 34 Filip Pizlo 2013-09-03 23:25:24 PDT
Landed in http://trac.webkit.org/changeset/155023