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

Unified Diff: runtime/vm/compiler.cc

Issue 1127383008: Fix CompilerStats info (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/compiler_stats.h » ('j') | runtime/vm/compiler_stats.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 45719)
+++ runtime/vm/compiler.cc (working copy)
@@ -375,7 +375,7 @@
if (optimized && !function.IsOptimizable()) {
return false;
}
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer);
+ TimerScope timer(FLAG_compiler_stats, &CSTAT_TIMER(codegen_timer));
bool is_compiled = false;
Thread* const thread = Thread::Current();
Zone* const zone = thread->zone();
@@ -406,7 +406,7 @@
// LongJump.
{
TimerScope timer(FLAG_compiler_stats,
- &CompilerStats::graphbuilder_timer,
+ &CSTAT_TIMER(graphbuilder_timer),
isolate);
ZoneGrowableArray<const ICData*>* ic_data_array =
new(zone) ZoneGrowableArray<const ICData*>();
@@ -455,7 +455,7 @@
if (optimized) {
TimerScope timer(FLAG_compiler_stats,
- &CompilerStats::ssa_timer,
+ &CSTAT_TIMER(ssa_timer),
isolate);
// Transform to SSA (virtual register 0 and no inlining arguments).
flow_graph->ComputeSSA(0, NULL);
@@ -478,7 +478,7 @@
// Top scope function has no caller (-1).
caller_inline_id.Add(-1);
TimerScope timer(FLAG_compiler_stats,
- &CompilerStats::graphoptimizer_timer,
+ &CSTAT_TIMER(graphoptimizer_timer),
isolate);
FlowGraphOptimizer optimizer(flow_graph);
@@ -495,7 +495,7 @@
// Inlining (mutates the flow graph)
if (FLAG_use_inlining) {
TimerScope timer(FLAG_compiler_stats,
- &CompilerStats::graphinliner_timer);
+ &CSTAT_TIMER(graphinliner_timer));
// Propagate types to create more inlining opportunities.
FlowGraphTypePropagator::Propagate(flow_graph);
DEBUG_ASSERT(flow_graph->VerifyUseLists());
@@ -710,27 +710,39 @@
caller_inline_id);
{
TimerScope timer(FLAG_compiler_stats,
- &CompilerStats::graphcompiler_timer,
+ &CSTAT_TIMER(graphcompiler_timer),
isolate);
graph_compiler.CompileGraph();
pipeline->FinalizeCompilation();
}
{
TimerScope timer(FLAG_compiler_stats,
- &CompilerStats::codefinalizer_timer,
+ &CSTAT_TIMER(codefinalizer_timer),
isolate);
// CreateDeoptInfo uses the object pool and needs to be done before
// FinalizeCode.
- const Array& deopt_info_array = Array::Handle(
- graph_compiler.CreateDeoptInfo(&assembler));
+ const Array& deopt_info_array =
+ Array::Handle(isolate, graph_compiler.CreateDeoptInfo(&assembler));
+ INC_STAT(isolate, total_code_size,
+ deopt_info_array.Length() * sizeof(uword));
const Code& code = Code::Handle(
Code::FinalizeCode(function, &assembler, optimized));
code.set_is_optimized(optimized);
- code.set_inlined_intervals(graph_compiler.inlined_code_intervals());
- code.set_inlined_id_to_function(
- Array::Handle(graph_compiler.InliningIdToFunction()));
+
+ const Array& intervals = graph_compiler.inlined_code_intervals();
+ INC_STAT(isolate, total_code_size,
+ intervals.Length() * sizeof(uword));
+ code.set_inlined_intervals(intervals);
+
+ const Array& inlined_id_array =
+ Array::Handle(isolate, graph_compiler.InliningIdToFunction());
+ INC_STAT(isolate, total_code_size,
+ inlined_id_array.Length() * sizeof(uword));
+ code.set_inlined_id_to_function(inlined_id_array);
+
graph_compiler.FinalizePcDescriptors(code);
code.set_deopt_info_array(deopt_info_array);
+
graph_compiler.FinalizeStackmaps(code);
graph_compiler.FinalizeVarDescriptors(code);
graph_compiler.FinalizeExceptionHandlers(code);
« no previous file with comments | « no previous file | runtime/vm/compiler_stats.h » ('j') | runtime/vm/compiler_stats.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698