Bug 187949

Summary: [JSC] Record CoW status in ArrayProfile correctly
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 187983    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews113 for mac-sierra
none
Archive of layout-test-results from ews200 for win-future
none
Patch
none
Archive of layout-test-results from ews112 for mac-sierra
none
Patch
none
Patch saam: review+

Description Yusuke Suzuki 2018-07-24 02:25:14 PDT
[JSC] Record CoW status in ArrayProfile
Comment 1 Yusuke Suzuki 2018-07-24 02:35:01 PDT
Created attachment 345647 [details]
Patch
Comment 2 Yusuke Suzuki 2018-07-24 02:39:48 PDT
Created attachment 345648 [details]
Patch
Comment 3 EWS Watchlist 2018-07-24 04:44:37 PDT
Comment on attachment 345648 [details]
Patch

Attachment 345648 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/8636661

New failing tests:
js/dom/dfg-ensure-non-array-array-storage-on-window.html
Comment 4 EWS Watchlist 2018-07-24 04:44:39 PDT
Created attachment 345658 [details]
Archive of layout-test-results from ews113 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 5 EWS Watchlist 2018-07-24 05:09:11 PDT
Comment on attachment 345648 [details]
Patch

Attachment 345648 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8637169

New failing tests:
http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
http/tests/security/canvas-remote-read-remote-video-redirect.html
Comment 6 EWS Watchlist 2018-07-24 05:09:22 PDT
Created attachment 345662 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 7 Yusuke Suzuki 2018-07-24 05:22:01 PDT
Created attachment 345664 [details]
Patch
Comment 8 EWS Watchlist 2018-07-24 07:10:42 PDT
Comment on attachment 345664 [details]
Patch

Attachment 345664 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/8637811

New failing tests:
js/dom/dfg-ensure-non-array-array-storage-on-window.html
Comment 9 EWS Watchlist 2018-07-24 07:10:43 PDT
Created attachment 345672 [details]
Archive of layout-test-results from ews112 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 10 Yusuke Suzuki 2018-07-24 08:38:41 PDT
Comment on attachment 345664 [details]
Patch

Investigating.
Comment 11 Yusuke Suzuki 2018-07-24 09:02:33 PDT
Created attachment 345678 [details]
Patch
Comment 12 Saam Barati 2018-07-24 12:23:58 PDT
Comment on attachment 345678 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345678&action=review

r=me

> Source/JavaScriptCore/bytecode/ArrayProfile.h:274
> +    ArrayModes m_observedArrayModes { 0 };
> +    unsigned m_observedIndexingModes { 0 };

I think this class would be smaller if you moved these two fields to behind StructureID
Comment 13 Yusuke Suzuki 2018-07-24 17:39:18 PDT
Comment on attachment 345678 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345678&action=review

Thanks!

>> Source/JavaScriptCore/bytecode/ArrayProfile.h:274
>> +    unsigned m_observedIndexingModes { 0 };
> 
> I think this class would be smaller if you moved these two fields to behind StructureID

Fixed.
Comment 14 Yusuke Suzuki 2018-07-24 17:41:15 PDT
Committed r234183: <https://trac.webkit.org/changeset/234183>
Comment 15 Radar WebKit Bug Importer 2018-07-24 17:43:15 PDT
<rdar://problem/42564046>
Comment 16 WebKit Commit Bot 2018-07-24 18:49:54 PDT
Re-opened since this is blocked by bug 187983
Comment 17 Yusuke Suzuki 2018-07-25 00:53:51 PDT
While Tools/Scripts/run-jsc-benchmark does not show this regression, sunspider benchmark driver in AWFY reproduces this regression. Investigating it.
Comment 18 Yusuke Suzuki 2018-07-25 04:04:55 PDT
It seems that Kraken desaturate's array profiles see CoW array at least once, but later, it is seeing non-CoW arrays. In this situation, specializing for non-CoW array is more profitable.
Anyway, I would like to reduce the scope of this patch first. I'll upload the patch that includes indexing type fixing.
Comment 19 Yusuke Suzuki 2018-07-25 04:08:40 PDT
Created attachment 345751 [details]
Patch
Comment 20 Yusuke Suzuki 2018-07-26 15:33:18 PDT
Ping?
Comment 21 Yusuke Suzuki 2018-07-27 15:00:42 PDT
Comment on attachment 345751 [details]
Patch

Thanks!
Comment 22 Yusuke Suzuki 2018-07-27 15:27:15 PDT
Committed r234331: <https://trac.webkit.org/changeset/234331>
Comment 23 Yusuke Suzuki 2018-07-27 23:43:25 PDT
It fixed Kraken/crypto-ccm regression a bit.