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

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

Issue 2902313004: CoreJIT snapshots without training. (Closed)
Patch Set: . Created 3 years, 7 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
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/megamorphic_cache_table.h" 5 #include "vm/megamorphic_cache_table.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/stub_code.h" 10 #include "vm/stub_code.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 true, // Static, but called as a method. 66 true, // Static, but called as a method.
67 false, // Not const. 67 false, // Not const.
68 false, // Not abstract. 68 false, // Not abstract.
69 false, // Not external. 69 false, // Not external.
70 false, // Not native. 70 false, // Not native.
71 cls, TokenPosition::kNoSource)); 71 cls, TokenPosition::kNoSource));
72 function.set_result_type(Type::Handle(Type::DynamicType())); 72 function.set_result_type(Type::Handle(Type::DynamicType()));
73 function.set_is_debuggable(false); 73 function.set_is_debuggable(false);
74 function.set_is_visible(false); 74 function.set_is_visible(false);
75 function.AttachCode(code); // Has a single entry point, as a static function. 75 function.AttachCode(code); // Has a single entry point, as a static function.
76 // For inclusion in Snapshot::kAppJIT. 76 // For inclusion in Snapshot::kFullJIT.
77 function.set_unoptimized_code(code); 77 function.set_unoptimized_code(code);
78 78
79 ASSERT(isolate->object_store()->megamorphic_miss_function() == 79 ASSERT(isolate->object_store()->megamorphic_miss_function() ==
80 Function::null()); 80 Function::null());
81 isolate->object_store()->SetMegamorphicMissHandler(code, function); 81 isolate->object_store()->SetMegamorphicMissHandler(code, function);
82 } 82 }
83 83
84 84
85 void MegamorphicCacheTable::PrintSizes(Isolate* isolate) { 85 void MegamorphicCacheTable::PrintSizes(Isolate* isolate) {
86 StackZone zone(Thread::Current()); 86 StackZone zone(Thread::Current());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 for (intptr_t i = 0; i <= max_probe_count; i++) { 143 for (intptr_t i = 0; i <= max_probe_count; i++) {
144 cumulative_entries += probe_counts[i]; 144 cumulative_entries += probe_counts[i];
145 OS::Print("Megamorphic probe %" Pd ": %" Pd " (%lf)\n", i, probe_counts[i], 145 OS::Print("Megamorphic probe %" Pd ": %" Pd " (%lf)\n", i, probe_counts[i],
146 static_cast<double>(cumulative_entries) / 146 static_cast<double>(cumulative_entries) /
147 static_cast<double>(entry_count)); 147 static_cast<double>(entry_count));
148 } 148 }
149 delete[] probe_counts; 149 delete[] probe_counts;
150 } 150 }
151 151
152 } // namespace dart 152 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698