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

Issue 11299298: Cache lookups at megamorphic call sites in optimized code. (Closed)

Created:
8 years ago by Kevin Millikin (Google)
Modified:
8 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Cache lookups at megamorphic call sites in optimized code. The function name and argument descriptor are mapped to a lookup cache at compile time. The cache maps class id to target function. It is resizable. Committed: https://code.google.com/p/dart/source/detail?r=15889

Patch Set 1 #

Total comments: 41

Patch Set 2 : Incorporate review comments, add no such method test. #

Total comments: 2

Patch Set 3 : One change I forgot. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+786 lines, -22 lines) Patch
M runtime/vm/code_generator.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 1 chunk +58 lines, -0 lines 0 comments Download
M runtime/vm/dart.cc View 3 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 1 chunk +18 lines, -17 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.h View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 1 chunk +67 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 1 chunk +67 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/isolate.h View 3 chunks +7 lines, -1 line 0 comments Download
M runtime/vm/isolate.cc View 1 chunk +3 lines, -0 lines 0 comments Download
A runtime/vm/megamorphic_cache_table.h View 1 1 chunk +55 lines, -0 lines 0 comments Download
A runtime/vm/megamorphic_cache_table.cc View 1 1 chunk +104 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 4 chunks +77 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 4 chunks +120 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 chunks +17 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/stub_code.h View 2 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M runtime/vm/stub_code_x64.cc View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
M runtime/vm/symbols.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A tests/language/megamorphic_no_such_method_test.dart View 1 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Kevin Millikin (Google)
8 years ago (2012-12-03 09:19:27 UTC) #1
Vyacheslav Egorov (Google)
LGTM with comments addressed. Please ensure that we have full test coverage for both hits ...
8 years ago (2012-12-03 14:55:22 UTC) #2
srdjan
Please test NoSuchMethod handling in presence of Megamorphic call. In addition to Slava's comments: https://codereview.chromium.org/11299298/diff/1/runtime/vm/code_generator.cc ...
8 years ago (2012-12-03 19:10:46 UTC) #3
Kevin Millikin (Google)
Thanks for the review. I've added a test for no such method at megamorphic call ...
8 years ago (2012-12-06 14:03:11 UTC) #4
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/11299298/diff/8001/runtime/vm/megamorphic_cache_table.cc File runtime/vm/megamorphic_cache_table.cc (right): https://codereview.chromium.org/11299298/diff/8001/runtime/vm/megamorphic_cache_table.cc#newcode30 runtime/vm/megamorphic_cache_table.cc:30: table_ = If you make kInitialCapacity == kCapacityIncrement ...
8 years ago (2012-12-10 09:23:44 UTC) #5
Kevin Millikin (Google)
8 years ago (2012-12-10 09:30:46 UTC) #6
https://codereview.chromium.org/11299298/diff/8001/runtime/vm/megamorphic_cac...
File runtime/vm/megamorphic_cache_table.cc (right):

https://codereview.chromium.org/11299298/diff/8001/runtime/vm/megamorphic_cac...
runtime/vm/megamorphic_cache_table.cc:30: table_ =
On 2012/12/10 09:23:44, Vyacheslav Egorov (Google) wrote:
> If you make kInitialCapacity == kCapacityIncrement and capacity_ = 0 initially
> then you can remove this and realloc will handle it. 

Thanks.  That's better.

Powered by Google App Engine
This is Rietveld 408576698