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/profile-generator.h" | 5 #include "src/profile-generator.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 if (line_info_ && !line_info_->empty()) { | 99 if (line_info_ && !line_info_->empty()) { |
100 return line_info_->GetSourceLineNumber(pc_offset); | 100 return line_info_->GetSourceLineNumber(pc_offset); |
101 } | 101 } |
102 return v8::CpuProfileNode::kNoLineNumberInfo; | 102 return v8::CpuProfileNode::kNoLineNumberInfo; |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 void CodeEntry::FillFunctionInfo(SharedFunctionInfo* shared) { | 106 void CodeEntry::FillFunctionInfo(SharedFunctionInfo* shared) { |
107 if (!shared->script()->IsScript()) return; | 107 if (!shared->script()->IsScript()) return; |
108 Script* script = Script::cast(shared->script()); | 108 Script* script = Script::cast(shared->script()); |
109 set_script_id(script->id()->value()); | 109 set_script_id(script->id()); |
110 set_position(shared->start_position()); | 110 set_position(shared->start_position()); |
111 set_bailout_reason(GetBailoutReason(shared->disable_optimization_reason())); | 111 set_bailout_reason(GetBailoutReason(shared->disable_optimization_reason())); |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 CpuProfileDeoptInfo CodeEntry::GetDeoptInfo() { | 115 CpuProfileDeoptInfo CodeEntry::GetDeoptInfo() { |
116 DCHECK(has_deopt_info()); | 116 DCHECK(has_deopt_info()); |
117 | 117 |
118 CpuProfileDeoptInfo info; | 118 CpuProfileDeoptInfo info; |
119 info.deopt_reason = deopt_reason_; | 119 info.deopt_reason = deopt_reason_; |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 case EXTERNAL: | 696 case EXTERNAL: |
697 return program_entry_; | 697 return program_entry_; |
698 case IDLE: | 698 case IDLE: |
699 return idle_entry_; | 699 return idle_entry_; |
700 default: return NULL; | 700 default: return NULL; |
701 } | 701 } |
702 } | 702 } |
703 | 703 |
704 } // namespace internal | 704 } // namespace internal |
705 } // namespace v8 | 705 } // namespace v8 |
OLD | NEW |