|
|
Created:
3 years, 8 months ago by Benedikt Meurer Modified:
3 years, 7 months ago CC:
v8-reviews_googlegroups.com Target Ref:
refs/heads/master Project:
v8 Visibility:
Public. |
Description[js] Avoid %_ClassOf for collection builtins.
The collection builtins (Map, Set, WeakMap, WeakSet) are still written
in JavaScript and make heavy use of %_ClassOf, which is kind of
expensive compared to a simple instance type check. Change that to use
simple instance type checks instead.
R=jarin@chromium.org
BUG=v8:6261, v8:6278, v8:6344
Review-Url: https://codereview.chromium.org/2814773005
Cr-Original-Commit-Position: refs/heads/master@{#45106}
Committed: https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521c0852
Review-Url: https://codereview.chromium.org/2814773005
Cr-Commit-Position: refs/heads/master@{#45124}
Committed: https://chromium.googlesource.com/v8/v8/+/516d8438adc44bfab2d99e90d23532fc92dfff1f
Patch Set 1 #Patch Set 2 : Make debug-evaluate happy. #
Total comments: 2
Patch Set 3 : Address comment from adamk@. REBASE. #Patch Set 4 : Skip failing inspector test in noturbofan variant (issue related to missing source position in ToBo… #Patch Set 5 : Remove the IsJSGlobalProxy magic. #Patch Set 6 : Disable the failing test for CS again. #
Total comments: 2
Messages
Total messages: 58 (33 generated)
The CQ bit was checked by bmeurer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
The CQ bit was unchecked by bmeurer@chromium.org
The CQ bit was checked by bmeurer@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng/build...) v8_linux64_gyp_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng_trigg...)
The CQ bit was checked by bmeurer@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jarin@chromium.org Link to the patchset: https://codereview.chromium.org/2814773005/#ps20001 (title: "Make debug-evaluate happy.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux64_verify_csa_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_verify_csa_rel_n...) v8_linux64_verify_csa_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_verify_csa_rel_n...)
adamk@chromium.org changed reviewers: + adamk@chromium.org
Is this ready to land? I was about to write up something similar myself but then remembered I saw this fly by recently. lgtm fwiw :)
The CQ bit was checked by bmeurer@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_mipsel_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mipsel_compile_rel...) v8_linux_nodcheck_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel_ng/bu...) v8_linux_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel_ng/builds/25270) v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/40315) v8_win_compile_dbg on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_compile_dbg/builds/3...)
On 2017/05/02 22:09:41, adamk wrote: > Is this ready to land? I was about to write up something similar myself but then > remembered I saw this fly by recently. > > lgtm fwiw :) I have no idea about the test failure in command line-out, feel free to take over this cl.
On 2017/05/03 02:48:09, Benedikt Meurer wrote: > On 2017/05/02 22:09:41, adamk wrote: > > Is this ready to land? I was about to write up something similar myself but > then > > remembered I saw this fly by recently. > > > > lgtm fwiw :) > > I have no idea about the test failure in command line-out, feel free to take > over this cl. This is some bad behavior in Crankshaft, where it's outputting a SourcePosition for a deopt point with no actual source position. Not sure how worthwhile it is to try to debug this further given that it only triggers with --no-turbo.
On 2017/05/03 22:54:31, adamk wrote: > On 2017/05/03 02:48:09, Benedikt Meurer wrote: > > On 2017/05/02 22:09:41, adamk wrote: > > > Is this ready to land? I was about to write up something similar myself but > > then > > > remembered I saw this fly by recently. > > > > > > lgtm fwiw :) > > > > I have no idea about the test failure in command line-out, feel free to take > > over this cl. > > This is some bad behavior in Crankshaft, where it's outputting a SourcePosition > for a deopt point with no actual source position. Not sure how worthwhile it is > to try to debug this further given that it only triggers with --no-turbo. Actually, I'm not entirely certain this is Crankshaft-specific, it seems like TF simply doesn't try to optimize Set.prototype.add. Even more strangely, the bad deopt info appears to be coming from the generation of code for ToBooleanICStub (which happens to be a HydrogenCodeStub).
https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrins... File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrins... src/compiler/js-intrinsic-lowering.cc:57: case Runtime::kInlineIsJSGlobalProxy: You can also add these to the no-FrameState whitelist in linkage.cc
The CQ bit was checked by bmeurer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrins... File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrins... src/compiler/js-intrinsic-lowering.cc:57: case Runtime::kInlineIsJSGlobalProxy: Good catch, done!
The CQ bit was checked by bmeurer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by bmeurer@chromium.org
The CQ bit was checked by bmeurer@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jarin@chromium.org, adamk@chromium.org Link to the patchset: https://codereview.chromium.org/2814773005/#ps60001 (title: "Skip failing inspector test in noturbofan variant (issue related to missing source position in ToBo…")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261 ========== to ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261,v8:6278,v8:6344 ==========
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1493920794475600, "parent_rev": "82503e9ba30f38d428431f69a82f885569ac4913", "commit_rev": "28170099fd1efc84a724ef133f335fec521c0852"}
Message was sent while issue was closed.
Description was changed from ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261,v8:6278,v8:6344 ========== to ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261,v8:6278,v8:6344 Review-Url: https://codereview.chromium.org/2814773005 Cr-Commit-Position: refs/heads/master@{#45106} Committed: https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521...
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2860123002/ by bmeurer@chromium.org. The reason for reverting is: Breaks node.js integration bot: https://build.chromium.org/p/client.v8.fyi/builders/V8%20-%20node.js%20integr....
Message was sent while issue was closed.
Description was changed from ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261,v8:6278,v8:6344 Review-Url: https://codereview.chromium.org/2814773005 Cr-Commit-Position: refs/heads/master@{#45106} Committed: https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521... ========== to ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261,v8:6278,v8:6344 Review-Url: https://codereview.chromium.org/2814773005 Cr-Commit-Position: refs/heads/master@{#45106} Committed: https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521... ==========
The CQ bit was checked by bmeurer@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jarin@chromium.org, adamk@chromium.org Link to the patchset: https://codereview.chromium.org/2814773005/#ps80001 (title: "Remove the IsJSGlobalProxy magic.")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_dbg_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng/builds/25515) v8_linux_dbg_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng_triggered/b...)
The CQ bit was checked by bmeurer@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by bmeurer@chromium.org
The CQ bit was checked by bmeurer@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jarin@chromium.org, adamk@chromium.org Link to the patchset: https://codereview.chromium.org/2814773005/#ps100001 (title: "Disable the failing test for CS again.")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 100001, "attempt_start_ts": 1493978024239150, "parent_rev": "c0a65cd295301f334e2bbfcce46a937cd708beec", "commit_rev": "516d8438adc44bfab2d99e90d23532fc92dfff1f"}
Message was sent while issue was closed.
Description was changed from ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261,v8:6278,v8:6344 Review-Url: https://codereview.chromium.org/2814773005 Cr-Commit-Position: refs/heads/master@{#45106} Committed: https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521... ========== to ========== [js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261,v8:6278,v8:6344 Review-Url: https://codereview.chromium.org/2814773005 Cr-Original-Commit-Position: refs/heads/master@{#45106} Committed: https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521... Review-Url: https://codereview.chromium.org/2814773005 Cr-Commit-Position: refs/heads/master@{#45124} Committed: https://chromium.googlesource.com/v8/v8/+/516d8438adc44bfab2d99e90d23532fc92d... ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/v8/v8/+/516d8438adc44bfab2d99e90d23532fc92d...
Message was sent while issue was closed.
rmcilroy@chromium.org changed reviewers: + rmcilroy@chromium.org
Message was sent while issue was closed.
https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrin... File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrin... src/compiler/js-intrinsic-lowering.cc:70: return ReduceIsInstanceType(node, JS_WEAK_SET_TYPE); Does it make sense to add these as intrinsics to the interpreter as well? We currently call out to the runtime for all these that you added here.
Message was sent while issue was closed.
https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrin... File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrin... src/compiler/js-intrinsic-lowering.cc:70: return ReduceIsInstanceType(node, JS_WEAK_SET_TYPE); Ideally this code should be obsolete soon with a CSA based Maps/Sets. Maybe until then, handling it in the interpreter might be beneficial indeed.
Message was sent while issue was closed.
On 2017/05/04 18:43:22, Benedikt Meurer wrote: > A revert of this CL (patchset #4 id:60001) has been created in > https://codereview.chromium.org/2860123002/ by mailto:bmeurer@chromium.org. > > The reason for reverting is: Breaks node.js integration bot: > https://build.chromium.org/p/client.v8.fyi/builders/V8%20-%20node.js%20integr.... What was the particular breakage here? It looks to me like the overhead of the %_ClassOf check for IS_GLOBAL is still noticeable in JS version of GetExistingHash() when called on a JSReceiver.
Message was sent while issue was closed.
On 2017/05/17 19:22:31, adamk wrote: > On 2017/05/04 18:43:22, Benedikt Meurer wrote: > > A revert of this CL (patchset #4 id:60001) has been created in > > https://codereview.chromium.org/2860123002/ by mailto:bmeurer@chromium.org. > > > > The reason for reverting is: Breaks node.js integration bot: > > > https://build.chromium.org/p/client.v8.fyi/builders/V8%20-%20node.js%20integr.... > > What was the particular breakage here? It looks to me like the overhead of the > %_ClassOf check for IS_GLOBAL is still noticeable in JS version of > GetExistingHash() when called on a JSReceiver. It was failing for bizarre reasons that I couldn't understand. I didn't spend a lot of time investigating, so it might be possible to make it work. |