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

Issue 14587008: Fix CopyCode to properly record object pointer writes. (Closed)

Created:
7 years, 7 months ago by danno
Modified:
7 years, 7 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Fix CopyCode to properly record object pointer writes. R=mstarzinger@chromium.org

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M src/heap.cc View 1 chunk +5 lines, -0 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
danno
7 years, 7 months ago (2013-05-14 14:53:04 UTC) #1
Michael Starzinger
7 years, 7 months ago (2013-05-14 16:43:10 UTC) #2
https://codereview.chromium.org/14587008/diff/1/src/heap.cc
File src/heap.cc (right):

https://codereview.chromium.org/14587008/diff/1/src/heap.cc#newcode3867
src/heap.cc:3867: incremental_marking()->RecordWrites(new_code);
So I looked into this write-barrier and I don't think we need one here. The
reasons for this are the following ...

1) All objects reachable from the code object header are pretenured and hence
cannot be in new-space. That's why the assertion in Heap::RecordWrites that the
address is not in code-space makes sense.

2) The newly allocated code object is guaranteed to still be white after we
copied over it's contents. So we couldn't have introduced black-to-white
pointers with the block copy.

3) The newly allocated code object will eventually be scanned by the marker
before a GC (it's still white) and hence all slots that point into evacuation
candidates will be discovered.

Powered by Google App Engine
This is Rietveld 408576698