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

Issue 643633003: AST nodes have at most one bailout/typefeedback ID now, saving lots of memory. (Closed)

Created:
6 years, 2 months ago by Sven Panne
Modified:
6 years, 2 months ago
Reviewers:
mvstanton
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

AST nodes have at most one bailout/typefeedback ID now, saving lots of memory. This is basically https://codereview.chromium.org/569573002/ done right: During construction, each node type tells its parent how many IDs it needs in addition to the parent's ones. This is done all the way up in the class hierarchy until a node's parent doesn't need any ID. At that point we know how many IDs in summary are needed, and we reserve the whole range at once, saving only the base ID of that range. All IDs are now calculated via simple offsets to that base ID. To all performaniacs: The C++ compiler simplifies the constant calculation to a simple load and the addition of a single constant. Note that the actual code is much simpler than all that prose above. :-) It's basically how compilers for OO languages figure out vtable entries. We still have lots of holes due to padding in the AST nodes, but this will be addressed in a separate CL. BUG=chromium:417697 LOG=y R=mvstanton@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=24524

Patch Set 1 #

Patch Set 2 : Rebased. More node types handled. #

Patch Set 3 : Removed reuse and GetNextId. #

Patch Set 4 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -197 lines) Patch
M src/ast.h View 1 2 57 chunks +225 lines, -189 lines 0 comments Download
M src/ast.cc View 4 chunks +5 lines, -8 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Sven Panne
One ID to rule them all, One ID for the TypeFeedbackOracle to find them, One ...
6 years, 2 months ago (2014-10-10 09:46:18 UTC) #2
Sven Panne
6 years, 2 months ago (2014-10-10 10:31:28 UTC) #4
mvstanton
Nice space savings! LGTM.
6 years, 2 months ago (2014-10-10 10:42:03 UTC) #5
Sven Panne
Committed patchset #4 (id:100001) manually as 24524 (presubmit successful).
6 years, 2 months ago (2014-10-10 10:52:41 UTC) #6
wingo
On 2014/10/10 10:52:41, Sven Panne wrote: > Committed patchset #4 (id:100001) manually as 24524 (presubmit ...
6 years, 2 months ago (2014-10-10 12:00:19 UTC) #7
Sven Panne
6 years, 2 months ago (2014-10-10 12:44:51 UTC) #8
Message was sent while issue was closed.
On 2014/10/10 12:00:19, wingo wrote:
> On 2014/10/10 10:52:41, Sven Panne wrote:
> > Committed patchset #4 (id:100001) manually as 24524 (presubmit successful).
> 
> Nice!  FWIW d8 --no-lazy http://wingolog.org/pub/jquery-parser-test.js on this
> goes down from 480.576M instructions to 478.964M instructions.  So it saves
time
> and space :)

As expected, the savings with this CL alone are not impressive due to padding.
The *real* savings come here: https://codereview.chromium.org/646803004/ (at
least for asm.js-relevant node types).

Powered by Google App Engine
This is Rietveld 408576698