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

Issue 8520006: Optimize the equality check case of ICCompare stubs. (Closed)

Created:
9 years, 1 month ago by Rico
Modified:
9 years ago
CC:
v8-dev
Visibility:
Public.

Description

Optimize the equality check case of ICCompare stubs. This includes specialcasing the generation when we know that the maps of the two objects are the same. In addition, a new specialized compare ic known objects cache is created. The reason for the cache is that we need to have access to the stub code from the roots; if we do not, the GC will collect the stub. In this specialized case we use the map pointer as key in the cache, and we always do a lookup before generating code. Actually hitting something in the cache will happen very rarely, but we could potentially overwrite an existing stub, which again will lead to the GC collecting this old stub (even if it is referenced from other code objects) Committed: http://code.google.com/p/v8/source/detail?r=10216

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 21

Patch Set 4 : '' #

Total comments: 20

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 6

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -52 lines) Patch
M src/code-stubs.h View 1 2 3 4 3 chunks +19 lines, -0 lines 0 comments Download
M src/code-stubs.cc View 1 2 3 4 5 6 7 8 9 4 chunks +50 lines, -11 lines 0 comments Download
M src/heap.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 1 comment Download
M src/heap.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/hydrogen.cc View 1 chunk +21 lines, -8 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 1 chunk +28 lines, -16 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/ic.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/ic.cc View 1 2 3 4 2 chunks +31 lines, -13 lines 0 comments Download
M src/mark-compact.cc View 1 2 3 4 5 6 2 chunks +3 lines, -4 lines 0 comments Download
M src/type-info.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/type-info.cc View 3 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Rico
This is the ia32 only version, if it looks good I will do the x64 ...
9 years, 1 month ago (2011-11-10 15:28:52 UTC) #1
Kevin Millikin (Chromium)
Even though I have a bunch of comments, this is pretty close. http://codereview.chromium.org/8520006/diff/17001/src/code-stubs.cc File src/code-stubs.cc ...
9 years, 1 month ago (2011-11-10 19:08:42 UTC) #2
Kevin Millikin (Chromium)
http://codereview.chromium.org/8520006/diff/17001/src/code-stubs.cc File src/code-stubs.cc (right): http://codereview.chromium.org/8520006/diff/17001/src/code-stubs.cc#newcode105 src/code-stubs.cc:105: if (use_special_cache || !FindCodeInCache(&code)) { And then include the ...
9 years, 1 month ago (2011-11-10 19:11:18 UTC) #3
Rico
Comments addressed. GenerateKnownObjects being static was a leftover from just creating the code and returning ...
9 years, 1 month ago (2011-11-11 08:49:10 UTC) #4
Kevin Millikin (Chromium)
Next round of comments. http://codereview.chromium.org/8520006/diff/29001/src/code-stubs.cc File src/code-stubs.cc (right): http://codereview.chromium.org/8520006/diff/29001/src/code-stubs.cc#newcode107 src/code-stubs.cc:107: CHECK(IsPregenerated() == code->is_pregenerated()); Maybe I'm ...
9 years, 1 month ago (2011-11-11 10:12:34 UTC) #5
Rico
Comments addressed http://codereview.chromium.org/8520006/diff/29001/src/code-stubs.cc File src/code-stubs.cc (right): http://codereview.chromium.org/8520006/diff/29001/src/code-stubs.cc#newcode107 src/code-stubs.cc:107: CHECK(IsPregenerated() == code->is_pregenerated()); On 2011/11/11 10:12:34, Kevin ...
9 years, 1 month ago (2011-11-15 10:12:26 UTC) #6
Kevin Millikin (Chromium)
LGTM, except I'm not sure why we never look compare stubs in the map code ...
9 years ago (2011-12-08 13:38:15 UTC) #7
Rico
Added lookup in the map cache, please take a quick look on this http://codereview.chromium.org/8520006/diff/48001/src/code-stubs.cc File ...
9 years ago (2011-12-08 15:54:56 UTC) #8
Kevin Millikin (Chromium)
9 years ago (2011-12-08 16:07:40 UTC) #9
OK.  Still LGTM.

http://codereview.chromium.org/8520006/diff/56014/src/heap.h
File src/heap.h (right):

http://codereview.chromium.org/8520006/diff/56014/src/heap.h#newcode238
src/heap.h:238: V(compare_ic_symbol, "(compare_ic)")                            
      \
I think the ones just above are print names.  We sometimes use something like
".compare_ic" for secret identifiers (.result, .catch-var, etc.).

Powered by Google App Engine
This is Rietveld 408576698