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

Issue 8245007: Refactor how embedded pointers are visited. (Closed)

Created:
9 years, 2 months ago by Michael Starzinger
Modified:
9 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Refactor how embedded pointers are visited. This refactoring (almost) gets rid of the requirement to get the target object address for an object pointer embedded in code objects. This is not possible on MIPS as pointers are encoded using two instructions. All usages of RelocInfo::target_object_address() are (almost) obsoleted by this change. The serializer still uses it, so MIPS will not yet work with snapshots turned on. R=danno@chromium.org,vegorov@chromium.org Committed: http://code.google.com/p/v8/source/detail?r=9597

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed comments by Vyacheslav Egorov. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -31 lines) Patch
M src/arm/assembler-arm-inl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/assembler.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/assembler-ia32-inl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/incremental-marking.cc View 1 1 chunk +6 lines, -8 lines 0 comments Download
M src/mark-compact.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/mark-compact.cc View 1 6 chunks +23 lines, -11 lines 0 comments Download
M src/objects.h View 1 chunk +1 line, -5 lines 0 comments Download
M src/objects.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/x64/assembler-x64-inl.h View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
danno
this idea looks much better than the #ifdef proposal that Paul sent us, but I ...
9 years, 2 months ago (2011-10-12 14:07:39 UTC) #1
danno
+vegorov
9 years, 2 months ago (2011-10-12 14:08:29 UTC) #2
Vyacheslav Egorov (Chromium)
lgtm http://codereview.chromium.org/8245007/diff/1/src/mark-compact.cc File src/mark-compact.cc (right): http://codereview.chromium.org/8245007/diff/1/src/mark-compact.cc#newcode3762 src/mark-compact.cc:3762: void MarkCompactCollector::RecordEmbeddedSlot(RelocInfo* rinfo, Why not unify with RecordRelocSlot? ...
9 years, 2 months ago (2011-10-12 14:21:53 UTC) #3
Michael Starzinger
9 years, 2 months ago (2011-10-12 15:38:36 UTC) #4
Added new patch set.

http://codereview.chromium.org/8245007/diff/1/src/mark-compact.cc
File src/mark-compact.cc (right):

http://codereview.chromium.org/8245007/diff/1/src/mark-compact.cc#newcode3762
src/mark-compact.cc:3762: void
MarkCompactCollector::RecordEmbeddedSlot(RelocInfo* rinfo,
On 2011/10/12 14:21:53, Vyacheslav Egorov wrote:
> Why not unify with RecordRelocSlot? seems almost identical.

Done.

http://codereview.chromium.org/8245007/diff/1/src/mark-compact.h
File src/mark-compact.h (right):

http://codereview.chromium.org/8245007/diff/1/src/mark-compact.h#newcode323
src/mark-compact.h:323: EMBEDDED_OBJECT_SLOT,
On 2011/10/12 14:21:53, Vyacheslav Egorov wrote:
> micro opt idea: consider placing it first (or in the middle) depending on the
> way switch over slot types is compiled in visit function (rationale: there are
> currently much more EMBEDDED_OBJECT_SLOTs than anything else)

Done. On both ia32 and x64 it is compiled as a lookup table. But I placed it
first to indicate (syntactically) that it is the most frequent type.

Powered by Google App Engine
This is Rietveld 408576698