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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1300033002: Fix compiler stats (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Review comments 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/compiler_stats.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 4a4178663fd54f0dcd1654d62096c537f3472710..c1d94b4627827d522dbaf578880a4700b20cc43f 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -902,9 +902,12 @@ void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) {
const ExceptionHandlers& handlers = ExceptionHandlers::Handle(
exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint()));
code.set_exception_handlers(handlers);
- INC_STAT(isolate(), total_code_size,
- ExceptionHandlers::InstanceSize(handlers.num_entries()));
- INC_STAT(isolate(), total_code_size, handlers.num_entries() * sizeof(uword));
+ if (FLAG_compiler_stats) {
+ Thread* thread = Thread::Current();
+ INC_STAT(thread, total_code_size,
+ ExceptionHandlers::InstanceSize(handlers.num_entries()));
+ INC_STAT(thread, total_code_size, handlers.num_entries() * sizeof(uword));
+ }
}
@@ -1012,7 +1015,9 @@ void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) {
}
}
code.set_static_calls_target_table(targets);
- INC_STAT(isolate(), total_code_size, targets.Length() * sizeof(uword));
+ INC_STAT(Thread::Current(),
+ total_code_size,
+ targets.Length() * sizeof(uword));
}
« no previous file with comments | « runtime/vm/compiler_stats.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698