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

Issue 188783003: Make maps in monomorphic IC stubs weak. (Closed)

Created:
6 years, 9 months ago by ulan
Modified:
6 years, 8 months ago
CC:
v8-dev
Visibility:
Public.

Description

Make maps in monomorphic IC stubs weak. Maps in monomorphic Load, KeyedLoad, Store, KeyedStore, and CompareNil IC stubs are treated as weak references by the marking visitor. During generation of an IC stub with a weak map, the stub is appended to the dependent code array of the map. When the map dies, all stubs in its dependent code array are invalidated by setting embedded maps to undefined. BUG=v8:2073 LOG=Y TEST=cctest/test-heap/WeakMapInMonomorphic*IC R=mstarzinger@chromium.org, verwaest@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=20679

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Address Toon's comments #

Patch Set 3 : Use stub.next_code_link to chain dependent IC stubs into a list #

Patch Set 4 : Add flags: is_weak_stub, is_invalidated_weak_stub #

Total comments: 1

Patch Set 5 : Move the head of dependent IC to dependent code #

Total comments: 4

Patch Set 6 : Rebase, address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+672 lines, -310 lines) Patch
M src/code-stubs.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/code-stubs.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/handles.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/heap.cc View 1 2 3 4 5 4 chunks +5 lines, -258 lines 0 comments Download
M src/ic.h View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M src/ic.cc View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
M src/lithium-codegen.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/mark-compact.h View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M src/mark-compact.cc View 1 2 3 4 5 6 chunks +76 lines, -30 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 9 chunks +43 lines, -6 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 3 chunks +36 lines, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 2 chunks +35 lines, -0 lines 0 comments Download
M src/objects-visiting.h View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
M src/objects-visiting.cc View 1 2 1 chunk +277 lines, -0 lines 0 comments Download
M src/objects-visiting-inl.h View 1 2 3 4 5 2 chunks +9 lines, -3 lines 0 comments Download
M src/stub-cache.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-heap.cc View 1 2 3 4 5 1 chunk +108 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
ulan
PTAL.
6 years, 8 months ago (2014-04-02 15:18:28 UTC) #1
Toon Verwaest
Overall looks good. Just some comments https://codereview.chromium.org/188783003/diff/120001/src/ic.cc File src/ic.cc (right): https://codereview.chromium.org/188783003/diff/120001/src/ic.cc#newcode458 src/ic.cc:458: maps.at(i)->AddDependentCode(DependentCode::kWeaklyEmbeddedGroup, stub); This ...
6 years, 8 months ago (2014-04-03 15:18:36 UTC) #2
Toon Verwaest
lgtm
6 years, 8 months ago (2014-04-03 15:39:05 UTC) #3
ulan
https://codereview.chromium.org/188783003/diff/120001/src/ic.cc File src/ic.cc (right): https://codereview.chromium.org/188783003/diff/120001/src/ic.cc#newcode458 src/ic.cc:458: maps.at(i)->AddDependentCode(DependentCode::kWeaklyEmbeddedGroup, stub); On 2014/04/03 15:18:36, Toon Verwaest wrote: > ...
6 years, 8 months ago (2014-04-03 15:40:25 UTC) #4
ulan
Please take another look. After testing on a few popular websites, I did the following ...
6 years, 8 months ago (2014-04-07 07:42:19 UTC) #5
ulan
After discussion with Michael, I moved the head of the dependent IC list into the ...
6 years, 8 months ago (2014-04-07 10:26:13 UTC) #6
Michael Starzinger
LGTM. https://codereview.chromium.org/188783003/diff/200001/src/objects-visiting.h File src/objects-visiting.h (right): https://codereview.chromium.org/188783003/diff/200001/src/objects-visiting.h#newcode490 src/objects-visiting.h:490: Object* VisitWeakList(Heap* heap, suggestion: As discussed offline, I ...
6 years, 8 months ago (2014-04-11 09:01:56 UTC) #7
ulan
Thank you for review, Michael. I will land after re-running all tests. My branch was ...
6 years, 8 months ago (2014-04-11 09:28:00 UTC) #8
ulan
6 years, 8 months ago (2014-04-11 10:36:25 UTC) #9
Message was sent while issue was closed.
Committed patchset #6 manually as r20679 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698