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

Issue 3461021: Add CODE_POINTER_ALIGN, use it in Page to align generated code. (Closed)

Created:
10 years, 3 months ago by Dmitry Titov
Modified:
9 years, 7 months ago
Reviewers:
Vitaly Repeshko
CC:
v8-dev
Visibility:
Public.

Description

Add CODE_POINTER_ALIGN, use it in Page to align generated code. The object's space in Page starts after Page header and is aligned to kMapAlignment which is 32 bytes on 32-bit and 8 bytes on 64-bit. In case of 64-bit target, the current page header size is exactly 32 bytes so we get the code magically aligned at 32 bytes but it is better to have a separate CODE_POINTER_ALIGN macro to make sure the object space in Page is aligned properly for both maps and code. There could be a small waste of bytes sometimes (since both Page header and Code header sizes are aligned separately) but it seems the optimal one would involve cross-dependencies between .h files and not clear if it's worth it. This is a back-port from Isolates branch. Committed: http://code.google.com/p/v8/source/detail?r=5526

Patch Set 1 #

Patch Set 2 : use CODE_POINTER_ALIGN in one more place #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -11 lines) Patch
M src/globals.h View 2 chunks +10 lines, -0 lines 1 comment Download
M src/heap.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 chunks +1 line, -7 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/spaces.h View 1 chunk +4 lines, -2 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Dmitry Titov
10 years, 3 months ago (2010-09-23 23:22:51 UTC) #1
Vitaly Repeshko
LGTM http://codereview.chromium.org/3461021/diff/2001/3001 File src/globals.h (right): http://codereview.chromium.org/3461021/diff/2001/3001#newcode218 src/globals.h:218: // Code entry points are aligned to 32 ...
10 years, 3 months ago (2010-09-24 15:45:38 UTC) #2
Dmitry Titov
10 years, 3 months ago (2010-09-24 21:49:27 UTC) #3
Fixed and landed.
Thanks!

Powered by Google App Engine
This is Rietveld 408576698