Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Issue 1708193003: Reduce the memory footprint of expression classifiers (Closed)

Created:
4 years, 10 months ago by nickie
Modified:
4 years, 6 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Reduce the memory footprint of expression classifiers This patch attempts to reduce the (stack) memory footprint of expression classifiers. Instead of keeping space in each classifier for all possible error messages that will (potentially) be reported, if an expression turns out to be a pattern or a non-pattern, such error messages are placed in a list shared by the FunctionState and each classifier keeps a couple of indices in this list. This requires that classifiers are used strictly in a stack-based fashion, which is also in line with my previous patch for revisiting non-pattern rewriting. R=adamk@chromium.org BUG=chromium:528697 Committed: https://crrev.com/dfb8d3331e7cb2c3e67ef820cbcb6cfbae7159e5 Cr-Commit-Position: refs/heads/master@{#36897}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Rebase #

Patch Set 3 : Fix enumeration types #

Patch Set 4 : Hunting a weird bug with an enum #

Patch Set 5 : Correctly fix enumeration types #

Patch Set 6 : Simplify expression classifier accumulate #

Patch Set 7 : Improve expression classifier accumulate #

Total comments: 23

Patch Set 8 : Fixes to address review comments #

Total comments: 5

Patch Set 9 : More fixes and space savings #

Total comments: 2

Patch Set 10 : Introduce implementation-limit error (too many non-pattern rewrites) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -187 lines) Patch
M src/messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M src/parsing/expression-classifier.h View 1 2 3 4 5 6 7 8 9 16 chunks +236 lines, -161 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -7 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 7 8 9 11 chunks +34 lines, -13 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 4 5 6 7 8 9 3 chunks +13 lines, -5 lines 0 comments Download

Messages

Total messages: 78 (26 generated)
nickie
4 years, 10 months ago (2016-02-18 16:41:45 UTC) #1
nickie
On 2016/02/18 16:41:45, nickie wrote: The baseline for this patch is Issue 1702063002: Non-pattern rewriting ...
4 years, 10 months ago (2016-02-18 16:45:08 UTC) #2
caitp (gmail)
https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h#newcode23 src/parsing/expression-classifier.h:23: T(StrongModeFormalParametersProduction, 6) \ I feel like we could probably ...
4 years, 10 months ago (2016-02-18 16:50:22 UTC) #4
caitp (gmail)
https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h#newcode161 src/parsing/expression-classifier.h:161: V8_INLINE const Error& binding_pattern_error() const { maybe if you ...
4 years, 10 months ago (2016-02-18 16:57:47 UTC) #5
caitp (gmail)
last DBC idea :p carry on https://codereview.chromium.org/1708193003/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/1708193003/diff/1/src/parsing/parser-base.h#newcode1991 src/parsing/parser-base.h:1991: ExpressionClassifier::BindingPatternError( A thought ...
4 years, 10 months ago (2016-02-18 17:04:09 UTC) #6
nickie
https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h#newcode23 src/parsing/expression-classifier.h:23: T(StrongModeFormalParametersProduction, 6) \ On 2016/02/18 16:50:22, caitp wrote: > ...
4 years, 10 months ago (2016-02-19 08:56:31 UTC) #7
caitp (gmail)
https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h#newcode434 src/parsing/expression-classifier.h:434: reported_errors_->Add(e, zone_); On 2016/02/19 08:56:31, nickie wrote: > On ...
4 years, 10 months ago (2016-02-19 09:07:29 UTC) #8
nickie
https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h#newcode434 src/parsing/expression-classifier.h:434: reported_errors_->Add(e, zone_); On 2016/02/19 09:07:28, caitp wrote: > On ...
4 years, 10 months ago (2016-02-19 09:25:50 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708193003/20001
4 years, 7 months ago (2016-05-17 10:45:58 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/16220)
4 years, 7 months ago (2016-05-17 10:54:48 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708193003/40001
4 years, 7 months ago (2016-05-17 11:56:05 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel_ng/builds/7359) v8_win64_rel_ng_triggered on ...
4 years, 7 months ago (2016-05-17 12:43:10 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708193003/60001
4 years, 7 months ago (2016-05-17 13:52:28 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 14:21:35 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708193003/80001
4 years, 7 months ago (2016-05-17 14:35:28 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 15:07:10 UTC) #25
Dan Ehrenberg
Does this still make CodeLoad 3% slower? Do we have a good understanding of how ...
4 years, 7 months ago (2016-05-18 01:11:04 UTC) #28
caitp (gmail)
On 2016/02/19 09:25:50, nickie wrote: > https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h > File src/parsing/expression-classifier.h (right): > > https://codereview.chromium.org/1708193003/diff/1/src/parsing/expression-classifier.h#newcode434 > ...
4 years, 7 months ago (2016-05-18 01:16:46 UTC) #29
nickie
On 2016/05/18 01:11:04, Dan Ehrenberg wrote: > Does this still make CodeLoad 3% slower? Do ...
4 years, 7 months ago (2016-05-18 07:51:47 UTC) #30
nickie
On 2016/05/18 07:51:47, nickie wrote: > On 2016/05/18 01:11:04, Dan Ehrenberg wrote: > > Does ...
4 years, 7 months ago (2016-05-18 13:02:20 UTC) #31
nickie
On 2016/05/18 01:16:46, caitp wrote: > We can make propagation very easy by appending the ...
4 years, 7 months ago (2016-05-18 13:42:08 UTC) #32
caitp (gmail)
On 2016/05/18 13:42:08, nickie wrote: > On 2016/05/18 01:16:46, caitp wrote: > > We can ...
4 years, 7 months ago (2016-05-18 13:44:09 UTC) #33
nickie
On 2016/05/18 13:44:09, caitp wrote: > There's no need to reflag them as `kUnused` --- ...
4 years, 7 months ago (2016-05-18 13:51:41 UTC) #34
nickie
On 2016/05/18 13:51:41, nickie wrote: > I will try it with CodeLoad and see if ...
4 years, 7 months ago (2016-05-18 14:50:53 UTC) #35
caitp (gmail)
On 2016/05/18 14:50:53, nickie wrote: > On 2016/05/18 13:51:41, nickie wrote: > > I will ...
4 years, 7 months ago (2016-05-18 15:28:39 UTC) #36
nickie
On 2016/05/18 15:28:39, caitp wrote: > I think there are some bugs in that simpler ...
4 years, 7 months ago (2016-05-18 15:45:33 UTC) #37
nickie
On 2016/05/18 15:45:33, nickie wrote: > I'm taking a look at it too, there's definitely ...
4 years, 7 months ago (2016-05-18 17:53:25 UTC) #38
nickie
On 2016/05/18 17:53:25, nickie wrote: > There was a stupid bug, I fixed it. Still ...
4 years, 7 months ago (2016-05-18 19:59:01 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1708193003/100001
4 years, 7 months ago (2016-05-23 13:30:37 UTC) #41
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-23 14:02:48 UTC) #43
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/120001
4 years, 6 months ago (2016-06-06 08:00:12 UTC) #45
nickie
I've run some benchmarks on this and two alternative CLs (https://codereview.chromium.org/1994643002/ and https://codereview.chromium.org/2002113002/). There results ...
4 years, 6 months ago (2016-06-06 08:08:58 UTC) #47
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-06 08:28:15 UTC) #49
adamk
https://codereview.chromium.org/1708193003/diff/120001/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/120001/src/parsing/expression-classifier.h#newcode382 src/parsing/expression-classifier.h:382: // As an exception to the above, the result ...
4 years, 6 months ago (2016-06-06 20:51:02 UTC) #50
aperez
Just popping in for some quick perf-related comments: as it turns out, at this very ...
4 years, 6 months ago (2016-06-07 16:14:50 UTC) #51
nickie
https://codereview.chromium.org/1708193003/diff/120001/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/120001/src/parsing/expression-classifier.h#newcode356 src/parsing/expression-classifier.h:356: invalid_productions_ &= ~CoverInitializedNameProduction; This was a bug, and fixed. ...
4 years, 6 months ago (2016-06-08 11:38:46 UTC) #52
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/140001
4 years, 6 months ago (2016-06-08 11:39:18 UTC) #54
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-08 12:05:00 UTC) #56
adamk
https://codereview.chromium.org/1708193003/diff/120001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/1708193003/diff/120001/src/parsing/parser-base.h#newcode473 src/parsing/parser-base.h:473: ZoneList<DestructuringAssignment> destructuring_assignments_to_rewrite_; On 2016/06/08 11:38:46, nickie wrote: > On ...
4 years, 6 months ago (2016-06-09 08:25:37 UTC) #57
nickie
https://codereview.chromium.org/1708193003/diff/140001/src/parsing/expression-classifier.h File src/parsing/expression-classifier.h (right): https://codereview.chromium.org/1708193003/diff/140001/src/parsing/expression-classifier.h#newcode374 src/parsing/expression-classifier.h:374: if (errors != 0) { On 2016/06/09 08:25:37, adamk ...
4 years, 6 months ago (2016-06-09 15:10:18 UTC) #58
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/160001
4 years, 6 months ago (2016-06-09 15:11:23 UTC) #60
adamk
lgtm % comment/check Also maybe retitle the top of the CL description to be more ...
4 years, 6 months ago (2016-06-09 15:30:01 UTC) #61
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-09 15:39:04 UTC) #63
nickie
On 9 June 2016 at 17:30, <adamk@chromium.org> wrote: > That CHECK seems like a good ...
4 years, 6 months ago (2016-06-10 13:19:39 UTC) #64
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/180001
4 years, 6 months ago (2016-06-10 13:23:08 UTC) #66
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-10 13:52:16 UTC) #69
nickie
I ran the perfbots again for PS #10 and updated the design doc.
4 years, 6 months ago (2016-06-10 16:18:35 UTC) #70
adamk
still lgtm I'm happy for you to land this and see what the bots say.
4 years, 6 months ago (2016-06-10 16:31:16 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1708193003/180001
4 years, 6 months ago (2016-06-10 16:32:57 UTC) #73
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 6 months ago (2016-06-10 16:35:01 UTC) #75
nickie
On 2016/06/10 16:31:16, adamk wrote: > still lgtm > > I'm happy for you to ...
4 years, 6 months ago (2016-06-10 16:35:48 UTC) #76
commit-bot: I haz the power
4 years, 6 months ago (2016-06-10 16:37:29 UTC) #78
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/dfb8d3331e7cb2c3e67ef820cbcb6cfbae7159e5
Cr-Commit-Position: refs/heads/master@{#36897}

Powered by Google App Engine
This is Rietveld 408576698