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

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: 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
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 770d1a92bd64ac3f0cb0b6e78699cb91550da963..fb575375f879ace144ea7d30af37a196e87a48fb 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -788,7 +788,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(zone, graph_compiler.edge_counters_array()));
}
function.set_unoptimized_code(code);
function.AttachCode(code);
@@ -1023,17 +1025,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) {
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698