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

Side by Side Diff: runtime/vm/object.cc

Issue 2007233002: Add --dump-megamorphic-stats. Lower megamorphic cache load factor to 50%. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« runtime/vm/megamorphic_cache_table.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 reinterpret_cast<RawClass*>(RAW_NULL); 158 reinterpret_cast<RawClass*>(RAW_NULL);
159 RawClass* Object::subtypetestcache_class_ = 159 RawClass* Object::subtypetestcache_class_ =
160 reinterpret_cast<RawClass*>(RAW_NULL); 160 reinterpret_cast<RawClass*>(RAW_NULL);
161 RawClass* Object::api_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 161 RawClass* Object::api_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
162 RawClass* Object::language_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 162 RawClass* Object::language_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
163 RawClass* Object::unhandled_exception_class_ = 163 RawClass* Object::unhandled_exception_class_ =
164 reinterpret_cast<RawClass*>(RAW_NULL); 164 reinterpret_cast<RawClass*>(RAW_NULL);
165 RawClass* Object::unwind_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 165 RawClass* Object::unwind_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
166 166
167 167
168 const double MegamorphicCache::kLoadFactor = 0.75; 168 const double MegamorphicCache::kLoadFactor = 0.50;
169 169
170 170
171 static void AppendSubString(Zone* zone, 171 static void AppendSubString(Zone* zone,
172 GrowableArray<const char*>* segments, 172 GrowableArray<const char*>* segments,
173 const char* name, 173 const char* name,
174 intptr_t start_pos, intptr_t len) { 174 intptr_t start_pos, intptr_t len) {
175 char* segment = zone->Alloc<char>(len + 1); // '\0'-terminated. 175 char* segment = zone->Alloc<char>(len + 1); // '\0'-terminated.
176 memmove(segment, name + start_pos, len); 176 memmove(segment, name + start_pos, len);
177 segment[len] = '\0'; 177 segment[len] = '\0';
178 segments->Add(segment); 178 segments->Add(segment);
(...skipping 22430 matching lines...) Expand 10 before | Expand all | Expand 10 after
22609 return UserTag::null(); 22609 return UserTag::null();
22610 } 22610 }
22611 22611
22612 22612
22613 const char* UserTag::ToCString() const { 22613 const char* UserTag::ToCString() const {
22614 const String& tag_label = String::Handle(label()); 22614 const String& tag_label = String::Handle(label());
22615 return tag_label.ToCString(); 22615 return tag_label.ToCString();
22616 } 22616 }
22617 22617
22618 } // namespace dart 22618 } // namespace dart
OLDNEW
« runtime/vm/megamorphic_cache_table.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698