diff options
author | 2017-08-09 13:20:34 -0700 | |
---|---|---|
committer | 2017-08-11 10:23:07 -0700 | |
commit | 1e065a54845da12541572f4f149e6ab0dcd20180 (patch) | |
tree | 061d28c8905c7bc8ac50c8c86f4073034afb5ba2 /compiler/optimizing/builder.cc | |
parent | f573972a087b798f74bf5404e271355a2805e100 (diff) |
optimizing: Refactor statistics to use OptimizingCompilerStats helper
Remove all copies of 'MaybeRecordStat', replacing them with a single
OptimizingCompilerStats::MaybeRecordStat helper.
Change-Id: I83b96b41439dccece3eee2e159b18c95336ea933
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r-- | compiler/optimizing/builder.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 2927e1f7c0..0d9d3d4c92 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -31,12 +31,6 @@ namespace art { -void HGraphBuilder::MaybeRecordStat(MethodCompilationStat compilation_stat) { - if (compilation_stats_ != nullptr) { - compilation_stats_->RecordStat(compilation_stat); - } -} - bool HGraphBuilder::SkipCompilation(size_t number_of_branches) { if (compiler_driver_ == nullptr) { // Note that the compiler driver is null when unit testing. @@ -53,7 +47,8 @@ bool HGraphBuilder::SkipCompilation(size_t number_of_branches) { VLOG(compiler) << "Skip compilation of huge method " << dex_file_->PrettyMethod(dex_compilation_unit_->GetDexMethodIndex()) << ": " << code_item_.insns_size_in_code_units_ << " code units"; - MaybeRecordStat(MethodCompilationStat::kNotCompiledHugeMethod); + MaybeRecordStat(compilation_stats_, + MethodCompilationStat::kNotCompiledHugeMethod); return true; } @@ -63,7 +58,8 @@ bool HGraphBuilder::SkipCompilation(size_t number_of_branches) { VLOG(compiler) << "Skip compilation of large method with no branch " << dex_file_->PrettyMethod(dex_compilation_unit_->GetDexMethodIndex()) << ": " << code_item_.insns_size_in_code_units_ << " code units"; - MaybeRecordStat(MethodCompilationStat::kNotCompiledLargeMethodNoBranches); + MaybeRecordStat(compilation_stats_, + MethodCompilationStat::kNotCompiledLargeMethodNoBranches); return true; } |