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

Issue 7029030: Use page header information to test for InNewSpace. (Closed)

Created:
9 years, 7 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Use page header information to test for InNewSpace. Use page lookup to test for InNewSpace-ness in assembler macro (IA32 only). Add function InNewSpacePage to test any address for being in new space. Use where it's known that the address is in a paged space. Retains the old InNewSpace for the cases where the address might not be in a paged space. Change InNewSpace(Object*) to use page header. Committed: http://code.google.com/p/v8/source/detail?r=7950

Patch Set 1 #

Total comments: 18

Patch Set 2 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -65 lines) Patch
M src/heap.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/heap-inl.h View 2 chunks +6 lines, -1 line 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 3 chunks +9 lines, -6 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 1 chunk +2 lines, -5 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 chunks +0 lines, -39 lines 0 comments Download
M src/ia32/macro-assembler-ia32-inl.h View 1 2 chunks +13 lines, -4 lines 0 comments Download
M src/objects.h View 1 3 chunks +5 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 chunk +2 lines, -2 lines 0 comments Download
src/runtime.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/spaces.h View 1 3 chunks +35 lines, -0 lines 0 comments Download
M src/spaces.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M src/store-buffer.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download
M src/top.cc View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
9 years, 7 months ago (2011-05-18 12:42:31 UTC) #1
Erik Corry
LGTM http://codereview.chromium.org/7029030/diff/1/src/heap-inl.h File src/heap-inl.h (right): http://codereview.chromium.org/7029030/diff/1/src/heap-inl.h#newcode257 src/heap-inl.h:257: bool result = new_space_.PageContains(object); Not mad keen on ...
9 years, 7 months ago (2011-05-19 07:22:31 UTC) #2
Lasse Reichstein
9 years, 7 months ago (2011-05-19 08:40:40 UTC) #3
http://codereview.chromium.org/7029030/diff/1/src/heap-inl.h
File src/heap-inl.h (right):

http://codereview.chromium.org/7029030/diff/1/src/heap-inl.h#newcode257
src/heap-inl.h:257: bool result = new_space_.PageContains(object);
That is the idea. 
If anything, this name is a little too nice. It should stand out like a sore
thumb, kindof like C++ casts.

http://codereview.chromium.org/7029030/diff/1/src/ia32/macro-assembler-ia32-i...
File src/ia32/macro-assembler-ia32-inl.h (right):

http://codereview.chromium.org/7029030/diff/1/src/ia32/macro-assembler-ia32-i...
src/ia32/macro-assembler-ia32-inl.h:37: void MacroAssembler::InNewSpace(Register
object,
Merged this with CheckPageFlag (accept object and scratch being the same
register, use byte test).

http://codereview.chromium.org/7029030/diff/1/src/objects.h
File src/objects.h (right):

http://codereview.chromium.org/7029030/diff/1/src/objects.h#newcode634
src/objects.h:634: class Failure;
Done.

http://codereview.chromium.org/7029030/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/7029030/diff/1/src/runtime.cc#newcode595
src/runtime.cc:595: if (value->IsFailure()) { OS::DebugBreak(); }
Ack, yes. Shouldn't happen any more.
I'll keep the assert (it's on bleeding edge too).

http://codereview.chromium.org/7029030/diff/1/src/spaces.h
File src/spaces.h (right):

http://codereview.chromium.org/7029030/diff/1/src/spaces.h#newcode1698
src/spaces.h:1698: // page, it must be a pointer into the beginning of it.
Moved.

http://codereview.chromium.org/7029030/diff/1/src/spaces.h#newcode1708
src/spaces.h:1708: return false;
Done.

http://codereview.chromium.org/7029030/diff/1/src/spaces.h#newcode1719
src/spaces.h:1719: if ((reinterpret_cast<uintptr_t>(o) & ~kHeapObjectTagMask) ==
And done.

http://codereview.chromium.org/7029030/diff/1/src/store-buffer.cc
File src/store-buffer.cc (right):

http://codereview.chromium.org/7029030/diff/1/src/store-buffer.cc#newcode420
src/store-buffer.cc:420: (owner == page->heap()->map_space() ?
On 2011/05/19 07:22:32, Erik Corry wrote:
> page->heap() could just be heap_

Done.

http://codereview.chromium.org/7029030/diff/1/src/top.cc
File src/top.cc (right):

http://codereview.chromium.org/7029030/diff/1/src/top.cc#newcode575
src/top.cc:575: if (exception->IsFailure()) return
exception->ToFailureUnchecked();
Already ported to bleeding edge (or actually, from bleeding_edge).
Will check branches.

Powered by Google App Engine
This is Rietveld 408576698