| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef V8_PROFILE_GENERATOR_H_ | 5 #ifndef V8_PROFILE_GENERATOR_H_ |
| 6 #define V8_PROFILE_GENERATOR_H_ | 6 #define V8_PROFILE_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include "include/v8-profiler.h" | 9 #include "include/v8-profiler.h" |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const JITLineInfoTable* line_info() const { return line_info_; } | 58 const JITLineInfoTable* line_info() const { return line_info_; } |
| 59 int script_id() const { return script_id_; } | 59 int script_id() const { return script_id_; } |
| 60 void set_script_id(int script_id) { script_id_ = script_id; } | 60 void set_script_id(int script_id) { script_id_ = script_id; } |
| 61 int position() const { return position_; } | 61 int position() const { return position_; } |
| 62 void set_position(int position) { position_ = position; } | 62 void set_position(int position) { position_ = position; } |
| 63 void set_bailout_reason(const char* bailout_reason) { | 63 void set_bailout_reason(const char* bailout_reason) { |
| 64 bailout_reason_ = bailout_reason; | 64 bailout_reason_ = bailout_reason; |
| 65 } | 65 } |
| 66 const char* bailout_reason() const { return bailout_reason_; } | 66 const char* bailout_reason() const { return bailout_reason_; } |
| 67 | 67 |
| 68 void set_deopt_info(const char* deopt_reason, SourcePosition position) { | 68 void set_deopt_info(const char* deopt_reason, SourcePosition position, |
| 69 int pc_offset) { |
| 69 DCHECK(deopt_position_.IsUnknown()); | 70 DCHECK(deopt_position_.IsUnknown()); |
| 70 deopt_reason_ = deopt_reason; | 71 deopt_reason_ = deopt_reason; |
| 71 deopt_position_ = position; | 72 deopt_position_ = position; |
| 73 pc_offset_ = pc_offset; |
| 72 } | 74 } |
| 73 const char* deopt_reason() const { return deopt_reason_; } | 75 const char* deopt_reason() const { return deopt_reason_; } |
| 74 SourcePosition deopt_position() const { return deopt_position_; } | 76 SourcePosition deopt_position() const { return deopt_position_; } |
| 75 bool has_deopt_info() const { return !deopt_position_.IsUnknown(); } | 77 bool has_deopt_info() const { return !deopt_position_.IsUnknown(); } |
| 76 void clear_deopt_info() { | 78 void clear_deopt_info() { |
| 77 deopt_reason_ = kNoDeoptReason; | 79 deopt_reason_ = kNoDeoptReason; |
| 78 deopt_position_ = SourcePosition::Unknown(); | 80 deopt_position_ = SourcePosition::Unknown(); |
| 79 } | 81 } |
| 80 | 82 |
| 81 void FillFunctionInfo(SharedFunctionInfo* shared); | 83 void FillFunctionInfo(SharedFunctionInfo* shared); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 const char* name_; | 116 const char* name_; |
| 115 const char* resource_name_; | 117 const char* resource_name_; |
| 116 int line_number_; | 118 int line_number_; |
| 117 int column_number_; | 119 int column_number_; |
| 118 int script_id_; | 120 int script_id_; |
| 119 int position_; | 121 int position_; |
| 120 List<OffsetRange>* no_frame_ranges_; | 122 List<OffsetRange>* no_frame_ranges_; |
| 121 const char* bailout_reason_; | 123 const char* bailout_reason_; |
| 122 const char* deopt_reason_; | 124 const char* deopt_reason_; |
| 123 SourcePosition deopt_position_; | 125 SourcePosition deopt_position_; |
| 126 int pc_offset_; |
| 124 JITLineInfoTable* line_info_; | 127 JITLineInfoTable* line_info_; |
| 125 Address instruction_start_; | 128 Address instruction_start_; |
| 126 | 129 |
| 127 DISALLOW_COPY_AND_ASSIGN(CodeEntry); | 130 DISALLOW_COPY_AND_ASSIGN(CodeEntry); |
| 128 }; | 131 }; |
| 129 | 132 |
| 130 | 133 |
| 131 class ProfileTree; | 134 class ProfileTree; |
| 132 | 135 |
| 133 class ProfileNode { | 136 class ProfileNode { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 CodeEntry* gc_entry_; | 378 CodeEntry* gc_entry_; |
| 376 CodeEntry* unresolved_entry_; | 379 CodeEntry* unresolved_entry_; |
| 377 | 380 |
| 378 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 381 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
| 379 }; | 382 }; |
| 380 | 383 |
| 381 | 384 |
| 382 } } // namespace v8::internal | 385 } } // namespace v8::internal |
| 383 | 386 |
| 384 #endif // V8_PROFILE_GENERATOR_H_ | 387 #endif // V8_PROFILE_GENERATOR_H_ |
| OLD | NEW |