Bug 196943

Summary: Add a baseline tracelet JIT
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: NEW    
Severity: Normal CC: benjamin, caitp, ews-watchlist, fpizlo, ggaren, gskachkov, guijemont, keith_miller, mark.lam, msaboff, rmorisset, rniwa, ticaiolima, tzagallo, webkit-bug-importer, xan.lopez, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 197394    
Bug Blocks:    
Attachments:
Description Flags
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
ews-watchlist: commit-queue-
Archive of layout-test-results from ews102 for mac-highsierra
none
Archive of layout-test-results from ews105 for mac-highsierra-wk2
none
Archive of layout-test-results from ews126 for ios-simulator-wk2
none
Archive of layout-test-results from ews114 for mac-highsierra
none
WIP
none
WIP
none
WIP
none
WIP
none
patch
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP
none
WIP none

Saam Barati
Reported 2019-04-15 15:24:38 PDT
It would allow us to 1. Compile parts of a function in the baseline JIT more quickly. We could have super low tier up counts for a tracelet. 2. allow those parts to get the benefits the baseline JIT gives us: ICs, no dispatch overhead If we find this is a successful avenue, extending this to the DFG could be a next step. tracelet-DFG could be optimized to be a single basic block, with "jumps" that end up going outside of it. We'd probably want to modify what kind of optimizations we did in such a compiler to allow us to compile very quickly.
Attachments
WIP (10.17 KB, patch)
2019-04-17 19:08 PDT, Saam Barati
no flags
WIP (42.60 KB, patch)
2019-04-18 15:57 PDT, Saam Barati
no flags
WIP (51.01 KB, patch)
2019-04-22 12:48 PDT, Saam Barati
no flags
WIP (63.28 KB, patch)
2019-04-22 17:05 PDT, Saam Barati
no flags
WIP (129.20 KB, patch)
2019-04-22 19:53 PDT, Saam Barati
no flags
WIP (135.18 KB, patch)
2019-04-25 17:46 PDT, Saam Barati
no flags
WIP (139.74 KB, patch)
2019-04-25 20:34 PDT, Saam Barati
no flags
WIP (140.97 KB, patch)
2019-04-26 15:00 PDT, Saam Barati
no flags
WIP (144.19 KB, patch)
2019-04-26 16:01 PDT, Saam Barati
no flags
WIP (146.42 KB, patch)
2019-04-26 17:19 PDT, Saam Barati
no flags
WIP (146.50 KB, patch)
2019-04-26 18:36 PDT, Saam Barati
no flags
WIP (154.87 KB, patch)
2019-04-29 15:52 PDT, Saam Barati
no flags
WIP (158.84 KB, patch)
2019-04-29 18:30 PDT, Saam Barati
no flags
WIP (158.81 KB, patch)
2019-04-29 18:48 PDT, Saam Barati
no flags
WIP (103.35 KB, patch)
2019-04-30 18:21 PDT, Saam Barati
ews-watchlist: commit-queue-
Archive of layout-test-results from ews102 for mac-highsierra (3.26 MB, application/zip)
2019-05-01 04:18 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.81 MB, application/zip)
2019-05-01 04:30 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews126 for ios-simulator-wk2 (8.36 MB, application/zip)
2019-05-01 05:15 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews114 for mac-highsierra (4.07 MB, application/zip)
2019-05-01 05:25 PDT, EWS Watchlist
no flags
WIP (102.58 KB, patch)
2019-05-01 20:07 PDT, Saam Barati
no flags
WIP (103.97 KB, patch)
2019-05-01 23:36 PDT, Saam Barati
no flags
WIP (103.96 KB, patch)
2019-05-06 14:55 PDT, Saam Barati
no flags
WIP (108.37 KB, patch)
2019-05-08 18:14 PDT, Saam Barati
no flags
patch (108.95 KB, patch)
2019-05-08 18:47 PDT, Saam Barati
no flags
WIP (112.00 KB, patch)
2019-05-09 12:44 PDT, Saam Barati
no flags
WIP (151.02 KB, patch)
2019-05-09 18:11 PDT, Saam Barati
no flags
WIP (154.38 KB, patch)
2019-05-10 12:32 PDT, Saam Barati
no flags
WIP (155.97 KB, patch)
2019-05-10 15:14 PDT, Saam Barati
no flags
WIP (155.84 KB, patch)
2019-05-13 13:10 PDT, Saam Barati
no flags
WIP (157.68 KB, patch)
2019-05-13 15:41 PDT, Saam Barati
no flags
WIP (158.58 KB, patch)
2019-05-16 18:11 PDT, Saam Barati
no flags
WIP (158.58 KB, patch)
2019-05-21 18:09 PDT, Saam Barati
no flags
Radar WebKit Bug Importer
Comment 1 2019-04-15 15:25:41 PDT
Saam Barati
Comment 2 2019-04-17 19:08:08 PDT
Created attachment 367712 [details] WIP it begins
Saam Barati
Comment 3 2019-04-18 15:57:19 PDT
Saam Barati
Comment 4 2019-04-22 12:48:28 PDT
Saam Barati
Comment 5 2019-04-22 17:05:29 PDT
Created attachment 367998 [details] WIP It can now (at least one program) with traces, although things are quite dumb at the moment and there are probably many bugs. Gonna start to work on the mechanics of the data structures that represent traces, the JITCode we will use, etc. Once that's rock solid and makes sense, I will work on tuning the perf and intelligently placing down trace_profile. Currently, the heuristic I dropped into bytecode generator generates way too many trace_profile ops.
Saam Barati
Comment 6 2019-04-22 19:53:26 PDT
Saam Barati
Comment 7 2019-04-25 17:46:35 PDT
Saam Barati
Comment 8 2019-04-25 20:34:38 PDT
Created attachment 368299 [details] WIP Got some fun crashers going on.
Saam Barati
Comment 9 2019-04-26 14:49:12 PDT
Comment on attachment 368299 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=368299&action=review > Source/JavaScriptCore/jit/JITCode.h:240 > + CodeRef<JSEntryPtrTag> ref() { return m_ref; } this was my issue! Oops. Naming functions ref() when something is RefCounted is a bad idea :-)
Saam Barati
Comment 10 2019-04-26 15:00:21 PDT
Saam Barati
Comment 11 2019-04-26 16:01:58 PDT
Saam Barati
Comment 12 2019-04-26 17:19:07 PDT
Created attachment 368369 [details] WIP Things seem to be working (with DFG disabled)
Saam Barati
Comment 13 2019-04-26 18:36:14 PDT
Saam Barati
Comment 14 2019-04-29 15:52:44 PDT
Saam Barati
Comment 15 2019-04-29 18:30:51 PDT
Created attachment 368525 [details] WIP seems to be starting to pass (most/all?) tests.
Saam Barati
Comment 16 2019-04-29 18:48:43 PDT
Created attachment 368527 [details] WIP Tests are passing. Gonna do some cleanup and start working on perf.
Saam Barati
Comment 17 2019-04-30 18:21:52 PDT
EWS Watchlist
Comment 18 2019-05-01 02:57:46 PDT
Attachment 368640 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/jit/ExecutableAllocator.cpp:163: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/ExecutableAllocator.cpp:165: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:39: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:40: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:41: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:42: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:47: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:48: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:49: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.cpp:50: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCode.h:276: The parameter name "entry" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/JavaScriptCore/jit/JITCode.h:287: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/bytecode/CodeBlock.cpp:1090: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.h:926: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:44: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:60: Bad include order. Mixing system and custom headers. [build/include_order] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:201: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:300: Non-label code inside switch statements should be indented. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:308: Almost always, snprintf is better than strcat. [security/printf] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:842: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:851: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:857: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:863: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:869: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:870: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:879: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:896: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:912: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:978: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:981: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1073: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1121: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1122: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1124: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1125: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1126: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1154: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1167: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1171: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JIT.cpp:1307: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/bytecode/CodeBlock.h:312: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/bytecode/CodeBlock.h:313: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/bytecode/CodeBlock.h:316: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/bytecode/CodeBlock.h:317: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/bytecode/CodeBlock.h:318: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/bytecode/CodeBlock.h:321: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/runtime/ScriptExecutable.cpp:187: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/runtime/ScriptExecutable.cpp:188: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/runtime/ScriptExecutable.cpp:189: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/runtime/ScriptExecutable.cpp:190: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:522: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:2000: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:2014: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:2019: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITInlines.h:250: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITWorklist.cpp:240: Should have a space between // and comment [whitespace/comments] [4] ERROR: Source/JavaScriptCore/jit/JITCodeMap.h:61: Missing space inside { }. [whitespace/braces] [5] ERROR: Source/JavaScriptCore/jit/JITCodeMap.h:96: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 58 in 35 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 19 2019-05-01 04:18:34 PDT
Comment on attachment 368640 [details] WIP Attachment 368640 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/12050413 New failing tests: js/dfg-double-vote-fuzz.html workers/bomb.html js/slow-stress/emscripten-memops.html
EWS Watchlist
Comment 20 2019-05-01 04:18:36 PDT
Created attachment 368658 [details] Archive of layout-test-results from ews102 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 21 2019-05-01 04:30:17 PDT
Comment on attachment 368640 [details] WIP Attachment 368640 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/12050420 New failing tests: js/dfg-double-vote-fuzz.html js/slow-stress/emscripten-memops.html
EWS Watchlist
Comment 22 2019-05-01 04:30:19 PDT
Created attachment 368660 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 23 2019-05-01 05:15:10 PDT
Comment on attachment 368640 [details] WIP Attachment 368640 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/12050486 New failing tests: js/dfg-double-vote-fuzz.html js/slow-stress/emscripten-memops.html
EWS Watchlist
Comment 24 2019-05-01 05:15:12 PDT
Created attachment 368662 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.14.4
EWS Watchlist
Comment 25 2019-05-01 05:25:43 PDT
Comment on attachment 368640 [details] WIP Attachment 368640 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/12050499 New failing tests: js/dfg-double-vote-fuzz.html js/slow-stress/marsaglia.html fast/canvas/webgl/uninitialized-test.html webgl/2.0.0/conformance2/textures/image_data/tex-3d-rgb8-rgb-unsigned_byte.html webgl/1.0.2/conformance/misc/uninitialized-test.html webgl/2.0.0/conformance/misc/uninitialized-test.html
EWS Watchlist
Comment 26 2019-05-01 05:25:45 PDT
Created attachment 368664 [details] Archive of layout-test-results from ews114 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 27 2019-05-01 06:04:53 PDT
Comment on attachment 368640 [details] WIP Attachment 368640 [details] did not pass jsc-ews (mac): Output: https://webkit-queues.webkit.org/results/12050522 New failing tests: wasm.yaml/wasm/lowExecutableMemory/exports-oom.js.default-wasm wasm.yaml/wasm/lowExecutableMemory/executable-memory-oom.js.default-wasm jsc-layout-tests.yaml/js/script-tests/dfg-double-vote-fuzz.js.layout-no-ftl jsc-layout-tests.yaml/js/script-tests/dfg-ensure-contiguous-on-string.js.layout-ftl-eager-no-cjit wasm.yaml/wasm/lowExecutableMemory/imports-oom.js.default-wasm jsc-layout-tests.yaml/js/script-tests/dfg-ensure-contiguous-on-string.js.layout-dfg-eager-no-cjit
Saam Barati
Comment 28 2019-05-01 20:07:20 PDT
Saam Barati
Comment 29 2019-05-01 23:36:17 PDT
Saam Barati
Comment 30 2019-05-06 14:55:47 PDT
Saam Barati
Comment 31 2019-05-08 18:14:46 PDT
Saam Barati
Comment 32 2019-05-08 18:47:58 PDT
Saam Barati
Comment 33 2019-05-09 12:44:44 PDT
Saam Barati
Comment 34 2019-05-09 18:11:48 PDT
Saam Barati
Comment 35 2019-05-10 12:32:12 PDT
Saam Barati
Comment 36 2019-05-10 15:14:49 PDT
Saam Barati
Comment 37 2019-05-13 13:10:44 PDT
Created attachment 369770 [details] WIP rebased
Saam Barati
Comment 38 2019-05-13 15:41:45 PDT
Saam Barati
Comment 39 2019-05-13 19:32:25 PDT
Perf not looking great so far. Continuing to investigate why it's slower. - It seems neutral on JS2 when baseline JIT is the final tier. - It's a slow down when enabling DFG/FTL. Seems like it shouldn't be too hard to find out why. - Initial testing shows it's a PLT slow down too
Saam Barati
Comment 40 2019-05-13 19:56:26 PDT
(In reply to Saam Barati from comment #39) > Perf not looking great so far. Continuing to investigate why it's slower. > > - It seems neutral on JS2 when baseline JIT is the final tier. > - It's a slow down when enabling DFG/FTL. Seems like it shouldn't be too > hard to find out why. > - Initial testing shows it's a PLT slow down too It seems my PLT regression is same as JS2 being regressed with DFG turned on. I need to look into why I made the DFG slower.
Filip Pizlo
Comment 41 2019-05-13 20:11:14 PDT
(In reply to Saam Barati from comment #40) > (In reply to Saam Barati from comment #39) > > Perf not looking great so far. Continuing to investigate why it's slower. > > > > - It seems neutral on JS2 when baseline JIT is the final tier. > > - It's a slow down when enabling DFG/FTL. Seems like it shouldn't be too > > hard to find out why. > > - Initial testing shows it's a PLT slow down too > > It seems my PLT regression is same as JS2 being regressed with DFG turned > on. I need to look into why I made the DFG slower. I think that if I was you, I’d stop running dog or FTL at all until you got the traveler-baseline to outperform baseline in some way and get to completely neutral versus baseline. The progression could even just be memory usage. I think it’s just useful to know from a strategy standpoint if we should be pursuing this at all, and if so, towards what end. It could become a different beast if the only benefit was memory.
Filip Pizlo
Comment 42 2019-05-13 20:11:37 PDT
(In reply to Filip Pizlo from comment #41) > (In reply to Saam Barati from comment #40) > > (In reply to Saam Barati from comment #39) > > > Perf not looking great so far. Continuing to investigate why it's slower. > > > > > > - It seems neutral on JS2 when baseline JIT is the final tier. > > > - It's a slow down when enabling DFG/FTL. Seems like it shouldn't be too > > > hard to find out why. > > > - Initial testing shows it's a PLT slow down too > > > > It seems my PLT regression is same as JS2 being regressed with DFG turned > > on. I need to look into why I made the DFG slower. > > I think that if I was you, I’d stop running dog or FTL at all until you got Lol I meant DFG. > the traveler-baseline to outperform baseline in some way and get to > completely neutral versus baseline. The progression could even just be > memory usage. > > I think it’s just useful to know from a strategy standpoint if we should be > pursuing this at all, and if so, towards what end. It could become a > different beast if the only benefit was memory.
Filip Pizlo
Comment 43 2019-05-13 20:12:24 PDT
(In reply to Filip Pizlo from comment #42) > (In reply to Filip Pizlo from comment #41) > > (In reply to Saam Barati from comment #40) > > > (In reply to Saam Barati from comment #39) > > > > Perf not looking great so far. Continuing to investigate why it's slower. > > > > > > > > - It seems neutral on JS2 when baseline JIT is the final tier. > > > > - It's a slow down when enabling DFG/FTL. Seems like it shouldn't be too > > > > hard to find out why. > > > > - Initial testing shows it's a PLT slow down too > > > > > > It seems my PLT regression is same as JS2 being regressed with DFG turned > > > on. I need to look into why I made the DFG slower. > > > > I think that if I was you, I’d stop running dog or FTL at all until you got > > Lol I meant DFG. > > > the traveler-baseline to outperform baseline in some way and get to Omg autocorrect. I meant tracelet-baseline. > > completely neutral versus baseline. The progression could even just be > > memory usage. > > > > I think it’s just useful to know from a strategy standpoint if we should be > > pursuing this at all, and if so, towards what end. It could become a > > different beast if the only benefit was memory.
Geoffrey Garen
Comment 44 2019-05-14 09:30:39 PDT
I would expect tracelet-baseline to beat baseline on JS2-latency, PLT, or JSBench. Would also be interesting to try: (a) Significantly reducing the tier-up threshold for tracelet-baseline; (b) Writing some cooked benchmarks with big functions that try to prove the value of tracelet-baseline.
Filip Pizlo
Comment 45 2019-05-14 10:02:46 PDT
(In reply to Geoffrey Garen from comment #44) > I would expect tracelet-baseline to beat baseline on JS2-latency, PLT, or > JSBench. > > Would also be interesting to try: > > (a) Significantly reducing the tier-up threshold for tracelet-baseline; > > (b) Writing some cooked benchmarks with big functions that try to prove the > value of tracelet-baseline. That’s what we expected, too. But it’s been in this state - no progression - for a week or two now. Saam could tell more details. One part that stood out to me is that this gets less benefit from concurrent JITing because the concurrent JIT seems to work better at larger granularity.
Geoffrey Garen
Comment 46 2019-05-14 10:12:39 PDT
Maybe try compiling small / all tracelets synchronously?
Filip Pizlo
Comment 47 2019-05-14 10:22:12 PDT
(In reply to Geoffrey Garen from comment #46) > Maybe try compiling small / all tracelets synchronously? I think Saam did that. :-) Problem is, then the cost of compiling that code is paid by the main thread. That could explain the lack of a progression.
Saam Barati
Comment 48 2019-05-14 14:50:12 PDT
(In reply to Filip Pizlo from comment #41) > (In reply to Saam Barati from comment #40) > > (In reply to Saam Barati from comment #39) > > > Perf not looking great so far. Continuing to investigate why it's slower. > > > > > > - It seems neutral on JS2 when baseline JIT is the final tier. > > > - It's a slow down when enabling DFG/FTL. Seems like it shouldn't be too > > > hard to find out why. > > > - Initial testing shows it's a PLT slow down too > > > > It seems my PLT regression is same as JS2 being regressed with DFG turned > > on. I need to look into why I made the DFG slower. > > I think that if I was you, I’d stop running dog or FTL at all until you got > the traveler-baseline to outperform baseline in some way and get to > completely neutral versus baseline. The progression could even just be > memory usage. > > I think it’s just useful to know from a strategy standpoint if we should be > pursuing this at all, and if so, towards what end. It could become a > different beast if the only benefit was memory. Yeah I've spent most of my time measuring with the DFG disabled both on baseline and tracelet. However, I enabled the DFG just to make sure I didn't regress stuff there. Which it's quite apparent that I have. It's almost certainly something that's fixable. And I'll focus on making baseline-only faster for now. With DFG disabled, my testing already shows that it's neutral. I haven't measure memory usage. I'm still trying to get it to be faster, so I'm working on that now for PLT5. If we decide to tune it for memory instead of perf, I'd change our tier up thresholds to be more conservative than I have now.
Saam Barati
Comment 49 2019-05-14 14:50:42 PDT
(In reply to Filip Pizlo from comment #47) > (In reply to Geoffrey Garen from comment #46) > > Maybe try compiling small / all tracelets synchronously? > > I think Saam did that. :-) > > Problem is, then the cost of compiling that code is paid by the main thread. > That could explain the lack of a progression. I only tried compiling *everything* synchronously instead of just small tracelets. It might be worth experimenting with this more.
Saam Barati
Comment 50 2019-05-16 18:11:53 PDT
Created attachment 370097 [details] WIP stashing away patch here. Probably has some fun logging in it atm.
Geoffrey Garen
Comment 51 2019-05-20 11:03:17 PDT
> I only tried compiling *everything* synchronously instead of just small > tracelets. It might be worth experimenting with this more. That's an interesting detail. I'll leave it to y'all to decide how much experimentation we want to do in this area -- but I think this would be a really interesting thing to try. My theory: If you know you're about to execute a snippet of code, JIT compiling the snippet and then executing it doesn't have much overhead. The interpreter would have iterated and decoded all those opcodes anyway, and the amount of JIT code emitted isn't enough to trigger memory pathologies. So, a simple strategy that said "this is my second trip through this basic block / extended basic block / loop / whatever, I'll compile just what I'm about to run" seems like it might be a win.
Saam Barati
Comment 52 2019-05-21 18:09:54 PDT
Created attachment 370364 [details] WIP Leaving this here as I'm reverting these changes away locally
Note You need to log in before you can comment on or make changes to this bug.