Chromium Code Reviews| 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 629 // In the latter case we know the caller for sure but in the | 629 // In the latter case we know the caller for sure but in the |
| 630 // former case we don't so we simply replace the frame with | 630 // former case we don't so we simply replace the frame with |
| 631 // 'unresolved' entry. | 631 // 'unresolved' entry. |
| 632 if (sample.top_frame_type == StackFrame::JAVA_SCRIPT) { | 632 if (sample.top_frame_type == StackFrame::JAVA_SCRIPT) { |
| 633 *entry++ = unresolved_entry_; | 633 *entry++ = unresolved_entry_; |
| 634 } | 634 } |
| 635 } | 635 } |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 | 638 |
| 639 for (const Address* stack_pos = sample.stack, | 639 for (const Address *stack_pos = sample.stack, |
|
titzer
2016/02/19 09:28:37
Formatting artifact? git cl format should have fix
alph
2016/02/19 16:24:29
So it did.
I hope you don't think I reformatted th
titzer
2016/02/19 16:36:33
I just asked because it looks backwards to our nor
| |
| 640 *stack_end = stack_pos + sample.frames_count; | 640 *stack_end = stack_pos + sample.frames_count; |
| 641 stack_pos != stack_end; | 641 stack_pos != stack_end; ++stack_pos) { |
| 642 ++stack_pos) { | |
| 643 *entry = code_map_.FindEntry(*stack_pos); | 642 *entry = code_map_.FindEntry(*stack_pos); |
| 644 | 643 |
| 645 // Skip unresolved frames (e.g. internal frame) and get source line of | 644 // Skip unresolved frames (e.g. internal frame) and get source line of |
| 646 // the first JS caller. | 645 // the first JS caller. |
| 647 if (src_line_not_found && *entry) { | 646 if (src_line_not_found && *entry) { |
| 648 int pc_offset = | 647 int pc_offset = |
| 649 static_cast<int>(*stack_pos - (*entry)->instruction_start()); | 648 static_cast<int>(*stack_pos - (*entry)->instruction_start()); |
| 650 src_line = (*entry)->GetSourceLine(pc_offset); | 649 src_line = (*entry)->GetSourceLine(pc_offset); |
| 651 if (src_line == v8::CpuProfileNode::kNoLineNumberInfo) { | 650 if (src_line == v8::CpuProfileNode::kNoLineNumberInfo) { |
| 652 src_line = (*entry)->line_number(); | 651 src_line = (*entry)->line_number(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 690 case EXTERNAL: | 689 case EXTERNAL: |
| 691 return program_entry_; | 690 return program_entry_; |
| 692 case IDLE: | 691 case IDLE: |
| 693 return idle_entry_; | 692 return idle_entry_; |
| 694 default: return NULL; | 693 default: return NULL; |
| 695 } | 694 } |
| 696 } | 695 } |
| 697 | 696 |
| 698 } // namespace internal | 697 } // namespace internal |
| 699 } // namespace v8 | 698 } // namespace v8 |
| OLD | NEW |