[ic] Experiment: disable map-specific handler cache.

IC data handlers support most of the hot cases nowdays. Let's see if
the map-specific code cache still help us to improve things.

BUG=v8:5561

Review-Url: https://codereview.chromium.org/2462973003
Cr-Commit-Position: refs/heads/master@{#40685}
This commit is contained in:
ishell 2016-11-01 04:18:20 -07:00 committed by Commit bot
parent c1753f5c3d
commit a52ffd44fd
3 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,9 @@ Handle<Code> PropertyHandlerCompiler::Find(Handle<Name> name,
Handle<Map> stub_holder,
Code::Kind kind,
CacheHolderFlag cache_holder) {
// TODO(ishell): Experiment: don't cache handlers in map-specific code cache.
return Handle<Code>();
Code::Flags flags = Code::ComputeHandlerFlags(kind, cache_holder);
Code* code = stub_holder->LookupInCodeCache(*name, flags);
if (code == nullptr) return Handle<Code>();

View File

@ -9992,6 +9992,8 @@ class CodeCache : public AllStatic {
void Map::UpdateCodeCache(Handle<Map> map,
Handle<Name> name,
Handle<Code> code) {
// TODO(ishell): Experiment: don't cache handlers in map-specific code cache.
return;
Isolate* isolate = map->GetIsolate();
Handle<FixedArray> cache(map->code_cache(), isolate);
Handle<FixedArray> new_cache = CodeCache::Put(isolate, cache, name, code);

View File

@ -40,6 +40,9 @@ static Handle<Code> GetDummyCode(Isolate* isolate) {
} // namespace
TEST(CodeCache) {
// TODO(ishell): Experiment: don't cache handlers in map-specific code cache.
return;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();