RESOLVED FIXED 164357
EvalCodeCache should not give up in strict mode and other cases
https://bugs.webkit.org/show_bug.cgi?id=164357
Summary EvalCodeCache should not give up in strict mode and other cases
Geoffrey Garen
Reported 2016-11-02 21:48:14 PDT
EvalCodeCache should not give up in strict mode and other cases
Attachments
Patch (8.75 KB, patch)
2016-11-02 21:54 PDT, Geoffrey Garen
no flags
Archive of layout-test-results from ews116 for mac-yosemite (1.89 MB, application/zip)
2016-11-03 06:37 PDT, Build Bot
no flags
Patch (11.69 KB, patch)
2016-11-03 16:42 PDT, Geoffrey Garen
no flags
Archive of layout-test-results from ews113 for mac-yosemite (1.87 MB, application/zip)
2016-11-03 18:44 PDT, Build Bot
no flags
Patch (12.26 KB, patch)
2016-11-04 14:48 PDT, Geoffrey Garen
msaboff: review+
Geoffrey Garen
Comment 1 2016-11-02 21:54:14 PDT
Build Bot
Comment 2 2016-11-03 06:37:17 PDT
Comment on attachment 293745 [details] Patch Attachment 293745 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2454760 New failing tests: js/dom/domjit-accessor-polymorphic.html
Build Bot
Comment 3 2016-11-03 06:37:20 PDT
Created attachment 293759 [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
Saam Barati
Comment 4 2016-11-03 10:25:50 PDT
Is that failure real? The patch makes sense to me.
Saam Barati
Comment 5 2016-11-03 10:36:55 PDT
Can you add some microbenchmarks that shows a speed up with block scoping? Maybe also some correctness tests for block scoping/with scoping
Geoffrey Garen
Comment 6 2016-11-03 16:42:39 PDT
Geoffrey Garen
Comment 7 2016-11-03 16:43:33 PDT
New patch includes a micro benchmark and correctness test.
Saam Barati
Comment 8 2016-11-03 16:48:37 PDT
Comment on attachment 293827 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=293827&action=review r=me > JSTests/ChangeLog:8 > + * microbenchmarks/eval-cached.js: Added. 45x faster now. lol, nice > Source/JavaScriptCore/bytecode/EvalCodeCache.h:90 > + uint32_t m_callSiteIndex; Why not use an actual CallSiteIndex instead of a uint32_t?
Geoffrey Garen
Comment 9 2016-11-03 16:55:17 PDT
> Why not use an actual CallSiteIndex instead of a uint32_t? I'm a CallSiteIndex noob. It looked to me like CallSiteIndex is a way to represent "CallSiteIndex or NULL". Is that right? I don't every want the NULL variant, so I thought uint32_t was the more specific type.
Saam Barati
Comment 10 2016-11-03 17:20:55 PDT
(In reply to comment #9) > > Why not use an actual CallSiteIndex instead of a uint32_t? > > I'm a CallSiteIndex noob. It looked to me like CallSiteIndex is a way to > represent "CallSiteIndex or NULL". Is that right? I don't every want the > NULL variant, so I thought uint32_t was the more specific type. It's true that some CallSiteIndex can be empty, however, just because that's allowed, I don't think making the field a CallSiteIndex makes it a less specific type. I actually think it's still a more specific type because not all uint32_t are a CallSiteIndex, but all CallSiteIndex are backed by a single uint32_t. I think it's OK to just mandate that no empty CallSiteIndex is passed to the cache. To me as a reader of the code, it's easier to understand a field shaped like: CallSiteIndex m_callSiteIndex; instead of uint32_t m_callSiteIndex;
Build Bot
Comment 11 2016-11-03 18:44:37 PDT
Comment on attachment 293827 [details] Patch Attachment 293827 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2457558 New failing tests: js/dom/domjit-accessor-polymorphic.html
Build Bot
Comment 12 2016-11-03 18:44:41 PDT
Created attachment 293845 [details] Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Geoffrey Garen
Comment 13 2016-11-04 10:35:06 PDT
Looks like some of the original EWS failures were fake, but the hang in js/dom/domjit-accessor-polymorphic.html is real.
Geoffrey Garen
Comment 14 2016-11-04 14:48:53 PDT
Michael Saboff
Comment 15 2016-11-04 15:06:42 PDT
Comment on attachment 293934 [details] Patch r=me NIT - It looks like some functions have the evalSource as the first argument and the callSiteIndex as the second argument, while others have the order flipped. I think it would be cleaner if all functions used the same order.
Geoffrey Garen
Comment 16 2016-11-04 15:52:16 PDT
> NIT - It looks like some functions have the evalSource as the first argument > and the callSiteIndex as the second argument, while others have the order > flipped. I think it would be cleaner if all functions used the same order. Fixed.
Geoffrey Garen
Comment 17 2016-11-04 16:05:18 PDT
Chris Dumez
Comment 18 2016-11-08 12:16:25 PST
There was a 10% Sunspider regression in the range r208404-r208416, could it be caused by this patch?
Chris Dumez
Comment 19 2016-11-08 12:21:14 PST
(In reply to comment #18) > There was a 10% Sunspider regression in the range r208404-r208416, could it > be caused by this patch? This really seems like the most likely candidate in the range. Also note that the most regressed subtest is date-format-tofte which is 160% regressed :)
Chris Dumez
Comment 20 2016-11-08 12:24:05 PST
(In reply to comment #19) > (In reply to comment #18) > > There was a 10% Sunspider regression in the range r208404-r208416, could it > > be caused by this patch? > > This really seems like the most likely candidate in the range. Also note > that the most regressed subtest is date-format-tofte which is 160% regressed > :) rdar://problem/29164133
Chris Dumez
Comment 21 2016-11-08 12:32:20 PST
(In reply to comment #20) > (In reply to comment #19) > > (In reply to comment #18) > > > There was a 10% Sunspider regression in the range r208404-r208416, could it > > > be caused by this patch? > > > > This really seems like the most likely candidate in the range. Also note > > that the most regressed subtest is date-format-tofte which is 160% regressed > > :) > > rdar://problem/29164133 Likely a 5% JetStream regression as well.
Geoffrey Garen
Comment 22 2016-11-08 12:58:18 PST
Yes, this patch caused a performance regression. Tracked here: https://bugs.webkit.org/show_bug.cgi?id=164499.
Note You need to log in before you can comment on or make changes to this bug.