Bug 194084

Summary: [JSC] Do not use InferredValue in non-JIT configuration
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, rniwa, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 193606, 193993    
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews103 for mac-highsierra
none
Archive of layout-test-results from ews112 for mac-highsierra
none
Archive of layout-test-results from ews106 for mac-highsierra-wk2
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Patch saam: review+

Yusuke Suzuki
Reported 2019-01-30 23:49:25 PST
This is typically used to identify that the given value is a singleton. And held value and watchpoint are used in DFG / FTL to make that value constant. This is allocated for each JSFunction and SymbolTable. It is 1. Costly. Since this also requires IsoSubspace, IsoCellSet, and finalizers. 2. While this InferredValue is also used in ObjectAllocationProfile to check the possibility of poly proto, InlinedWatchpoint is enough for this use case.
Attachments
Patch (12.68 KB, patch)
2019-01-31 00:29 PST, Yusuke Suzuki
no flags
Patch (14.57 KB, patch)
2019-01-31 00:38 PST, Yusuke Suzuki
no flags
Archive of layout-test-results from ews103 for mac-highsierra (968.48 KB, application/zip)
2019-01-31 01:38 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews112 for mac-highsierra (1.31 MB, application/zip)
2019-01-31 01:39 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews106 for mac-highsierra-wk2 (704.01 KB, application/zip)
2019-01-31 01:46 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (888.40 KB, application/zip)
2019-01-31 02:06 PST, EWS Watchlist
no flags
Patch (14.96 KB, patch)
2019-01-31 02:14 PST, Yusuke Suzuki
saam: review+
Yusuke Suzuki
Comment 1 2019-01-31 00:22:07 PST
(In reply to Yusuke Suzuki from comment #0) > This is typically used to identify that the given value is a singleton. And > held value and watchpoint are used in DFG / FTL to make that value constant. > This is allocated for each JSFunction and SymbolTable. It is > > 1. Costly. Since this also requires IsoSubspace, IsoCellSet, and finalizers. > 2. While this InferredValue is also used in ObjectAllocationProfile to check > the possibility of poly proto, InlinedWatchpoint is enough for this use case. Actually, in non-JIT configuration, WatchpointState is enough (InlineWatchpointSet is unnecessary).
Yusuke Suzuki
Comment 2 2019-01-31 00:29:03 PST
Yusuke Suzuki
Comment 3 2019-01-31 00:30:12 PST
Comment on attachment 360701 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=360701&action=review > Source/JavaScriptCore/runtime/FunctionExecutable.cpp:61 > + if (VM::canUseJIT()) Currently, we are using `VM::canUseJIT()` condition here. But we can change this to `VM::isInMiniMode()` if we have a null check in JIT code for `singletonFunction()`. Either is OK to me.
Yusuke Suzuki
Comment 4 2019-01-31 00:38:31 PST
EWS Watchlist
Comment 5 2019-01-31 01:38:45 PST
Comment on attachment 360702 [details] Patch Attachment 360702 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10966995 Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 6 2019-01-31 01:38:47 PST
Created attachment 360705 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 7 2019-01-31 01:39:06 PST
Comment on attachment 360702 [details] Patch Attachment 360702 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10966942 Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 8 2019-01-31 01:39:08 PST
Created attachment 360706 [details] Archive of layout-test-results from ews112 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 9 2019-01-31 01:46:16 PST
Comment on attachment 360702 [details] Patch Attachment 360702 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10967002 Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 10 2019-01-31 01:46:18 PST
Created attachment 360708 [details] Archive of layout-test-results from ews106 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 11 2019-01-31 02:06:42 PST
Comment on attachment 360702 [details] Patch Attachment 360702 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10966994 Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 12 2019-01-31 02:06:44 PST
Created attachment 360710 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Yusuke Suzuki
Comment 13 2019-01-31 02:14:48 PST
Saam Barati
Comment 14 2019-01-31 08:37:49 PST
Comment on attachment 360711 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=360711&action=review > Source/JavaScriptCore/ChangeLog:10 > + is preferable target for poly proto. But in this case, we do not need to have full InferredValue. Just holding WatchpointState It’s worth actually explaining what you’re doing here. You’re seeing if we ever create more than once. And you’re also saying only the JIT cares about the actual function being inferred > Source/JavaScriptCore/runtime/FunctionExecutable.h:193 > + void notifyWrite(VM& vm, JSValue value, const char* reason) This name makes less sense in this context. You should rename it to make more sense. Maybe notifyCreation.
Yusuke Suzuki
Comment 15 2019-01-31 11:07:41 PST
Comment on attachment 360711 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=360711&action=review >> Source/JavaScriptCore/ChangeLog:10 >> + is preferable target for poly proto. But in this case, we do not need to have full InferredValue. Just holding WatchpointState > > It’s worth actually explaining what you’re doing here. You’re seeing if we ever create more than once. And you’re also saying only the JIT cares about the actual function being inferred Make sense. Described. >> Source/JavaScriptCore/runtime/FunctionExecutable.h:193 >> + void notifyWrite(VM& vm, JSValue value, const char* reason) > > This name makes less sense in this context. You should rename it to make more sense. Maybe notifyCreation. Nice, changed.
Yusuke Suzuki
Comment 16 2019-01-31 11:13:25 PST
Radar WebKit Bug Importer
Comment 17 2019-01-31 11:14:33 PST
Note You need to log in before you can comment on or make changes to this bug.