OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 "src/profiler/profile-generator.h" | 5 #include "src/profiler/profile-generator.h" |
6 | 6 |
7 #include "src/ast/scopeinfo.h" | 7 #include "src/ast/scopeinfo.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/global-handles.h" | 10 #include "src/global-handles.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 void ProfileNode::Print(int indent) { | 223 void ProfileNode::Print(int indent) { |
224 base::OS::Print("%5u %*s %s%s %d #%d", self_ticks_, indent, "", | 224 base::OS::Print("%5u %*s %s%s %d #%d", self_ticks_, indent, "", |
225 entry_->name_prefix(), entry_->name(), entry_->script_id(), | 225 entry_->name_prefix(), entry_->name(), entry_->script_id(), |
226 id()); | 226 id()); |
227 if (entry_->resource_name()[0] != '\0') | 227 if (entry_->resource_name()[0] != '\0') |
228 base::OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); | 228 base::OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number()); |
229 base::OS::Print("\n"); | 229 base::OS::Print("\n"); |
230 for (size_t i = 0; i < deopt_infos_.size(); ++i) { | 230 for (size_t i = 0; i < deopt_infos_.size(); ++i) { |
231 CpuProfileDeoptInfo& info = deopt_infos_[i]; | 231 CpuProfileDeoptInfo& info = deopt_infos_[i]; |
232 base::OS::Print( | 232 base::OS::Print("%*s;;; deopted at script_id: %d position: %" PRIuS |
233 "%*s;;; deopted at script_id: %d position: %d with reason '%s'.\n", | 233 " with reason '%s'.\n", |
234 indent + 10, "", info.stack[0].script_id, info.stack[0].position, | 234 indent + 10, "", info.stack[0].script_id, |
235 info.deopt_reason); | 235 info.stack[0].position, info.deopt_reason); |
236 for (size_t index = 1; index < info.stack.size(); ++index) { | 236 for (size_t index = 1; index < info.stack.size(); ++index) { |
237 base::OS::Print("%*s;;; Inline point: script_id %d position: %d.\n", | 237 base::OS::Print("%*s;;; Inline point: script_id %d position: %" PRIuS |
| 238 ".\n", |
238 indent + 10, "", info.stack[index].script_id, | 239 indent + 10, "", info.stack[index].script_id, |
239 info.stack[index].position); | 240 info.stack[index].position); |
240 } | 241 } |
241 } | 242 } |
242 const char* bailout_reason = entry_->bailout_reason(); | 243 const char* bailout_reason = entry_->bailout_reason(); |
243 if (bailout_reason != GetBailoutReason(BailoutReason::kNoReason) && | 244 if (bailout_reason != GetBailoutReason(BailoutReason::kNoReason) && |
244 bailout_reason != CodeEntry::kEmptyBailoutReason) { | 245 bailout_reason != CodeEntry::kEmptyBailoutReason) { |
245 base::OS::Print("%*s bailed out due to '%s'\n", indent + 10, "", | 246 base::OS::Print("%*s bailed out due to '%s'\n", indent + 10, "", |
246 bailout_reason); | 247 bailout_reason); |
247 } | 248 } |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 case EXTERNAL: | 710 case EXTERNAL: |
710 return program_entry_; | 711 return program_entry_; |
711 case IDLE: | 712 case IDLE: |
712 return idle_entry_; | 713 return idle_entry_; |
713 default: return NULL; | 714 default: return NULL; |
714 } | 715 } |
715 } | 716 } |
716 | 717 |
717 } // namespace internal | 718 } // namespace internal |
718 } // namespace v8 | 719 } // namespace v8 |
OLD | NEW |