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

Unified Diff: runtime/vm/compiler.cc

Issue 1343383003: VM: Store edge counters in one per-function array. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: clean up comments, save space in IL Instruction class. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index fe4fc6448d65d11a330040f6d3c0f3ad3662176d..a6ac11a01fb90bd0fcf84204af741b387868826b 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -786,7 +786,9 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
} else { // not optimized.
if (!Compiler::always_optimize() &&
(function.ic_data_array() == Array::null())) {
- function.SaveICDataMap(graph_compiler.deopt_id_to_ic_data());
+ function.SaveICDataMap(
+ graph_compiler.deopt_id_to_ic_data(),
+ Array::Handle(graph_compiler.edge_counters_array()));
srdjan 2015/09/23 19:24:43 zone,
Florian Schneider 2015/09/28 09:19:43 Done.
}
function.set_unoptimized_code(code);
function.AttachCode(code);
@@ -1025,17 +1027,6 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
Timer per_compile_timer(FLAG_trace_compiler, "Compilation time");
per_compile_timer.Start();
- // Restore unoptimized code if needed.
- if (optimized) {
- if (!Compiler::always_optimize()) {
- const Error& error = Error::Handle(
- zone, Compiler::EnsureUnoptimizedCode(Thread::Current(), function));
- if (!error.IsNull()) {
- return error.raw();
- }
- }
- }
-
ParsedFunction* parsed_function = new(zone) ParsedFunction(
thread, Function::ZoneHandle(zone, function.raw()));
if (FLAG_trace_compiler) {

Powered by Google App Engine
This is Rietveld 408576698