Bug 158045

Summary: REGRESSION: JSBench spends a lot of time transitioning to/from dictionary
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, fpizlo, keith_miller, mark.lam, msaboff, rniwa, sbarati
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 158143    
Bug Blocks:    
Attachments:
Description Flags
Patch
sbarati: review+, buildbot: commit-queue-
Archive of layout-test-results from ews105 for mac-yosemite-wk2
none
Archive of layout-test-results from ews101 for mac-yosemite
none
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Archive of layout-test-results from ews116 for mac-yosemite none

Description Geoffrey Garen 2016-05-24 16:28:28 PDT
REGRESSION: JSBench spends a lot of time transitioning to/from dictionary
Comment 1 Geoffrey Garen 2016-05-24 16:36:48 PDT
Created attachment 279719 [details]
Patch
Comment 2 Saam Barati 2016-05-24 16:52:45 PDT
Comment on attachment 279719 [details]
Patch

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

r=me

> Source/JavaScriptCore/runtime/Operations.h:212
> +            if (structure->hasBeenFlattenedBefore())
> +                return InvalidPrototypeChain;

Is it worth having an assertion in flattenDictionaryStructure to make sure we don't end up in a cycle of flattening?
Comment 3 Geoffrey Garen 2016-05-24 17:04:43 PDT
> Is it worth having an assertion in flattenDictionaryStructure to make sure
> we don't end up in a cycle of flattening?

I'm not sure. Right now, flattening is a policy decision, and some callers choose to flatten even if in a cycle.

We could add the assertion, but only after changing the policy. It's not clear to me if a policy change is warranted or not.
Comment 4 Build Bot 2016-05-24 17:28:57 PDT
Comment on attachment 279719 [details]
Patch

Attachment 279719 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1377260

New failing tests:
js/cached-window-properties.html
Comment 5 Build Bot 2016-05-24 17:29:00 PDT
Created attachment 279726 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-05-24 17:32:54 PDT
Comment on attachment 279719 [details]
Patch

Attachment 279719 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1377274

New failing tests:
js/cached-window-properties.html
Comment 7 Build Bot 2016-05-24 17:32:59 PDT
Created attachment 279727 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 8 Build Bot 2016-05-24 17:40:55 PDT
Comment on attachment 279719 [details]
Patch

Attachment 279719 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1377277

New failing tests:
js/cached-window-properties.html
Comment 9 Build Bot 2016-05-24 17:41:00 PDT
Created attachment 279729 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 10 Build Bot 2016-05-24 17:49:23 PDT
Comment on attachment 279719 [details]
Patch

Attachment 279719 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1377291

New failing tests:
js/cached-window-properties.html
Comment 11 Build Bot 2016-05-24 17:49:27 PDT
Created attachment 279731 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 12 Geoffrey Garen 2016-05-26 15:28:54 PDT
Committed r201436: <http://trac.webkit.org/changeset/201436>
Comment 13 Saam Barati 2016-05-26 17:19:59 PDT
(In reply to comment #12)
> Committed r201436: <http://trac.webkit.org/changeset/201436>

Looks like this might also be a 9% code-load speedup
https://arewefastyet.com/#machine=29&view=breakdown&suite=octane
Comment 14 Ryosuke Niwa 2016-05-26 19:48:54 PDT
This patch appears to have caused 30% regression on Dromaeo DOM core.
Comment 15 WebKit Commit Bot 2016-05-26 19:52:27 PDT
Re-opened since this is blocked by bug 158143
Comment 16 Geoffrey Garen 2016-06-01 15:21:01 PDT
Committed r201573: <http://trac.webkit.org/changeset/201573>
Comment 17 Ryosuke Niwa 2016-06-01 19:56:26 PDT
This was 3% overall JSBench progression.