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

Issue 1704943002: Encode interpreter::SourcePositionTable as variable-length ints. (Closed)

Created:
4 years, 10 months ago by vogelheim
Modified:
4 years, 10 months ago
CC:
Hannes Payer (out of office), oth, ulan, 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

Encode interpreter::SourcePositionTable as variable-length ints. This reduces the memory consumption of SourcePositionTable by ca. 2/3. Over Octane, this reduces the source position table memory consumption from ~370kB to ~115kB, which makes it ca. 10% of the total bytecode size (~1.1MB) BUG= Committed: https://crrev.com/a6f41f7b8226555c5900440f6e3092b3545ee0f6 Cr-Commit-Position: refs/heads/master@{#34250}

Patch Set 1 #

Patch Set 2 : Add test + fixes. #

Patch Set 3 : Fix iterator. #

Total comments: 18

Patch Set 4 : Address Yang's comments. #

Total comments: 5

Patch Set 5 : Ross' feedback: Separate byte encoding from other processing. #

Total comments: 6

Patch Set 6 : Ross' feedback: Lazy encode entries instead of scanning backwards. #

Patch Set 7 : Fix multi-revert case & add test. #

Total comments: 2

Patch Set 8 : Ross' feedback: Remove RevertPosition entirely. #

Patch Set 9 : Make windows compiler happy. #

Total comments: 8

Patch Set 10 : More review feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -95 lines) Patch
M src/debug/debug.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M src/heap/heap.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 2 3 4 5 6 7 8 9 6 chunks +11 lines, -14 lines 0 comments Download
M src/interpreter/source-position-table.h View 1 2 3 4 5 6 7 1 chunk +34 lines, -26 lines 0 comments Download
M src/interpreter/source-position-table.cc View 1 2 3 4 5 6 7 8 9 2 chunks +150 lines, -46 lines 0 comments Download
M src/objects.h View 1 chunk +1 line, -1 line 0 comments Download
M src/objects.cc View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 chunk +1 line, -2 lines 0 comments Download
A test/unittests/interpreter/source-position-table-unittest.cc View 1 2 3 4 5 6 7 1 chunk +72 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (7 generated)
vogelheim
rmcilroy: src/interpreter OWNERs review. jochen: src/heap OWNERs review. heap.cc change is only moderately exciting, though. ...
4 years, 10 months ago (2016-02-17 14:30:58 UTC) #3
jochen (gone - plz use gerrit)
lgtm
4 years, 10 months ago (2016-02-17 14:38:29 UTC) #4
Yang
lgtm with a bunch of comments. https://codereview.chromium.org/1704943002/diff/40001/src/interpreter/source-position-table.cc File src/interpreter/source-position-table.cc (right): https://codereview.chromium.org/1704943002/diff/40001/src/interpreter/source-position-table.cc#newcode37 src/interpreter/source-position-table.cc:37: class TypeBit : ...
4 years, 10 months ago (2016-02-17 19:54:51 UTC) #5
vogelheim
https://codereview.chromium.org/1704943002/diff/40001/src/interpreter/source-position-table.cc File src/interpreter/source-position-table.cc (right): https://codereview.chromium.org/1704943002/diff/40001/src/interpreter/source-position-table.cc#newcode37 src/interpreter/source-position-table.cc:37: class TypeBit : public BitField8<bool, 6, 1> {}; On ...
4 years, 10 months ago (2016-02-18 13:06:10 UTC) #6
rmcilroy
https://codereview.chromium.org/1704943002/diff/60001/src/interpreter/source-position-table.cc File src/interpreter/source-position-table.cc (right): https://codereview.chromium.org/1704943002/diff/60001/src/interpreter/source-position-table.cc#newcode59 src/interpreter/source-position-table.cc:59: bytes.push_back(MoreBit::encode(more) | DCHECK value is less than 7 bits? ...
4 years, 10 months ago (2016-02-18 14:29:53 UTC) #7
Yang
On 2016/02/18 14:29:53, rmcilroy wrote: > https://codereview.chromium.org/1704943002/diff/60001/src/interpreter/source-position-table.cc > File src/interpreter/source-position-table.cc (right): > > https://codereview.chromium.org/1704943002/diff/60001/src/interpreter/source-position-table.cc#newcode59 > ...
4 years, 10 months ago (2016-02-18 14:36:02 UTC) #8
rmcilroy
On 2016/02/18 14:36:02, Yang wrote: > On 2016/02/18 14:29:53, rmcilroy wrote: > > > https://codereview.chromium.org/1704943002/diff/60001/src/interpreter/source-position-table.cc ...
4 years, 10 months ago (2016-02-18 14:43:57 UTC) #9
vogelheim
https://codereview.chromium.org/1704943002/diff/60001/src/interpreter/source-position-table.cc File src/interpreter/source-position-table.cc (right): https://codereview.chromium.org/1704943002/diff/60001/src/interpreter/source-position-table.cc#newcode98 src/interpreter/source-position-table.cc:98: EncodeBytes(bytes, value, size - 1); On 2016/02/18 14:29:53, rmcilroy ...
4 years, 10 months ago (2016-02-18 17:11:19 UTC) #10
Yang
https://codereview.chromium.org/1704943002/diff/40001/src/interpreter/source-position-table.cc File src/interpreter/source-position-table.cc (right): https://codereview.chromium.org/1704943002/diff/40001/src/interpreter/source-position-table.cc#newcode37 src/interpreter/source-position-table.cc:37: class TypeBit : public BitField8<bool, 6, 1> {}; On ...
4 years, 10 months ago (2016-02-19 08:28:02 UTC) #11
rmcilroy
lgtm, but two suggestions which I think would make things even better. https://codereview.chromium.org/1704943002/diff/80001/src/interpreter/source-position-table.cc File src/interpreter/source-position-table.cc ...
4 years, 10 months ago (2016-02-22 12:38:41 UTC) #12
vogelheim
https://codereview.chromium.org/1704943002/diff/80001/src/interpreter/source-position-table.cc File src/interpreter/source-position-table.cc (right): https://codereview.chromium.org/1704943002/diff/80001/src/interpreter/source-position-table.cc#newcode61 src/interpreter/source-position-table.cc:61: DCHECK(abs(value) < (1 << 30)); On 2016/02/22 12:38:40, rmcilroy ...
4 years, 10 months ago (2016-02-22 18:33:33 UTC) #14
rmcilroy
Great, thanks for making these changes! Please add BUG=v8:4690 to the description. LGTM! https://codereview.chromium.org/1704943002/diff/180001/src/interpreter/bytecode-array-builder.cc File ...
4 years, 10 months ago (2016-02-22 20:51:52 UTC) #15
Yang
LGTM! I do have a few suggestions. https://codereview.chromium.org/1704943002/diff/180001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1704943002/diff/180001/src/interpreter/bytecode-array-builder.cc#newcode1205 src/interpreter/bytecode-array-builder.cc:1205: if (exit_seen_in_block_) ...
4 years, 10 months ago (2016-02-22 21:56:25 UTC) #16
vogelheim
https://codereview.chromium.org/1704943002/diff/180001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1704943002/diff/180001/src/interpreter/bytecode-array-builder.cc#newcode1205 src/interpreter/bytecode-array-builder.cc:1205: if (exit_seen_in_block_) return; On 2016/02/22 20:51:52, rmcilroy wrote: > ...
4 years, 10 months ago (2016-02-24 12:29:30 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1704943002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1704943002/200001
4 years, 10 months ago (2016-02-24 12:51:29 UTC) #20
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 10 months ago (2016-02-24 12:53:48 UTC) #22
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/a6f41f7b8226555c5900440f6e3092b3545ee0f6 Cr-Commit-Position: refs/heads/master@{#34250}
4 years, 10 months ago (2016-02-24 12:54:01 UTC) #24
vogelheim
4 years, 10 months ago (2016-02-24 13:31:41 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:200001) has been created in
https://codereview.chromium.org/1728193003/ by vogelheim@chromium.org.

The reason for reverting is: Build failure on Linux64 arm64 ASAN:

http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20ASAN%20arm64%20...

(Leaks memory, somehow.).

Powered by Google App Engine
This is Rietveld 408576698