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

Side by Side Diff: src/compilation-statistics.cc

Issue 2609173005: [V8] Run clang-tidy performance-for-range-copy check on src/ (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <ostream> // NOLINT(readability/streams) 5 #include <ostream> // NOLINT(readability/streams)
6 #include <vector> 6 #include <vector>
7 7
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/compilation-statistics.h" 9 #include "src/compilation-statistics.h"
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 typedef std::vector<CompilationStatistics::PhaseMap::const_iterator> 129 typedef std::vector<CompilationStatistics::PhaseMap::const_iterator>
130 SortedPhases; 130 SortedPhases;
131 SortedPhases sorted_phases(s.phase_map_.size()); 131 SortedPhases sorted_phases(s.phase_map_.size());
132 for (auto it = s.phase_map_.begin(); it != s.phase_map_.end(); ++it) { 132 for (auto it = s.phase_map_.begin(); it != s.phase_map_.end(); ++it) {
133 sorted_phases[it->second.insert_order_] = it; 133 sorted_phases[it->second.insert_order_] = it;
134 } 134 }
135 135
136 if (!ps.machine_output) WriteHeader(os); 136 if (!ps.machine_output) WriteHeader(os);
137 for (auto phase_kind_it : sorted_phase_kinds) { 137 for (const auto& phase_kind_it : sorted_phase_kinds) {
138 const auto& phase_kind_name = phase_kind_it->first; 138 const auto& phase_kind_name = phase_kind_it->first;
139 if (!ps.machine_output) { 139 if (!ps.machine_output) {
140 for (auto phase_it : sorted_phases) { 140 for (const auto& phase_it : sorted_phases) {
141 const auto& phase_stats = phase_it->second; 141 const auto& phase_stats = phase_it->second;
142 if (phase_stats.phase_kind_name_ != phase_kind_name) continue; 142 if (phase_stats.phase_kind_name_ != phase_kind_name) continue;
143 const auto& phase_name = phase_it->first; 143 const auto& phase_name = phase_it->first;
144 WriteLine(os, ps.machine_output, phase_name.c_str(), phase_stats, 144 WriteLine(os, ps.machine_output, phase_name.c_str(), phase_stats,
145 s.total_stats_); 145 s.total_stats_);
146 } 146 }
147 WritePhaseKindBreak(os); 147 WritePhaseKindBreak(os);
148 } 148 }
149 const auto& phase_kind_stats = phase_kind_it->second; 149 const auto& phase_kind_stats = phase_kind_it->second;
150 WriteLine(os, ps.machine_output, phase_kind_name.c_str(), phase_kind_stats, 150 WriteLine(os, ps.machine_output, phase_kind_name.c_str(), phase_kind_stats,
151 s.total_stats_); 151 s.total_stats_);
152 os << std::endl; 152 os << std::endl;
153 } 153 }
154 154
155 if (!ps.machine_output) WriteFullLine(os); 155 if (!ps.machine_output) WriteFullLine(os);
156 WriteLine(os, ps.machine_output, "totals", s.total_stats_, s.total_stats_); 156 WriteLine(os, ps.machine_output, "totals", s.total_stats_, s.total_stats_);
157 157
158 return os; 158 return os;
159 } 159 }
160 160
161 } // namespace internal 161 } // namespace internal
162 } // namespace v8 162 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698