Bug 187949 - [JSC] Record CoW status in ArrayProfile correctly
Summary: [JSC] Record CoW status in ArrayProfile correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on: 187983
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-24 02:25 PDT by Yusuke Suzuki
Modified: 2018-07-27 23:43 PDT (History)
7 users (show)

See Also:


Attachments
Patch (17.81 KB, patch)
2018-07-24 02:35 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (18.55 KB, patch)
2018-07-24 02:39 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews113 for mac-sierra (3.07 MB, application/zip)
2018-07-24 04:44 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews200 for win-future (12.88 MB, application/zip)
2018-07-24 05:09 PDT, EWS Watchlist
no flags Details
Patch (18.55 KB, patch)
2018-07-24 05:22 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews112 for mac-sierra (3.09 MB, application/zip)
2018-07-24 07:10 PDT, EWS Watchlist
no flags Details
Patch (18.66 KB, patch)
2018-07-24 09:02 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (10.85 KB, patch)
2018-07-25 04:08 PDT, Yusuke Suzuki
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.