OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 INLINE(const char* name_prefix() const) { return name_prefix_; } | 105 INLINE(const char* name_prefix() const) { return name_prefix_; } |
106 INLINE(bool has_name_prefix() const) { return name_prefix_[0] != '\0'; } | 106 INLINE(bool has_name_prefix() const) { return name_prefix_[0] != '\0'; } |
107 INLINE(const char* name() const) { return name_; } | 107 INLINE(const char* name() const) { return name_; } |
108 INLINE(const char* resource_name() const) { return resource_name_; } | 108 INLINE(const char* resource_name() const) { return resource_name_; } |
109 INLINE(int line_number() const) { return line_number_; } | 109 INLINE(int line_number() const) { return line_number_; } |
110 INLINE(void set_shared_id(int shared_id)) { shared_id_ = shared_id; } | 110 INLINE(void set_shared_id(int shared_id)) { shared_id_ = shared_id; } |
111 INLINE(int security_token_id() const) { return security_token_id_; } | 111 INLINE(int security_token_id() const) { return security_token_id_; } |
112 | 112 |
113 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag)); | 113 INLINE(static bool is_js_function_tag(Logger::LogEventsAndTags tag)); |
114 | 114 |
| 115 INLINE(int frame_setup_offset() const) { return frame_setup_offset_; } |
| 116 INLINE(void set_frame_setup_offset(int offset)) { |
| 117 frame_setup_offset_ = offset; |
| 118 } |
| 119 INLINE(int frame_destroy_offset() const) { return frame_destroy_offset_; } |
| 120 INLINE(void set_frame_destroy_offset(int offset)) { |
| 121 frame_destroy_offset_ = offset; |
| 122 } |
| 123 |
115 void CopyData(const CodeEntry& source); | 124 void CopyData(const CodeEntry& source); |
116 uint32_t GetCallUid() const; | 125 uint32_t GetCallUid() const; |
117 bool IsSameAs(CodeEntry* entry) const; | 126 bool IsSameAs(CodeEntry* entry) const; |
118 | 127 |
119 static const char* const kEmptyNamePrefix; | 128 static const char* const kEmptyNamePrefix; |
120 | 129 |
121 private: | 130 private: |
122 Logger::LogEventsAndTags tag_; | 131 Logger::LogEventsAndTags tag_; |
123 const char* name_prefix_; | 132 const char* name_prefix_; |
124 const char* name_; | 133 const char* name_; |
125 const char* resource_name_; | 134 const char* resource_name_; |
126 int line_number_; | 135 int line_number_; |
127 int shared_id_; | 136 int shared_id_; |
128 int security_token_id_; | 137 int security_token_id_; |
| 138 int frame_setup_offset_; |
| 139 int frame_destroy_offset_; |
129 | 140 |
130 DISALLOW_COPY_AND_ASSIGN(CodeEntry); | 141 DISALLOW_COPY_AND_ASSIGN(CodeEntry); |
131 }; | 142 }; |
132 | 143 |
133 | 144 |
134 class ProfileTree; | 145 class ProfileTree; |
135 | 146 |
136 class ProfileNode { | 147 class ProfileNode { |
137 public: | 148 public: |
138 INLINE(ProfileNode(ProfileTree* tree, CodeEntry* entry)); | 149 INLINE(ProfileNode(ProfileTree* tree, CodeEntry* entry)); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 255 |
245 DISALLOW_COPY_AND_ASSIGN(CpuProfile); | 256 DISALLOW_COPY_AND_ASSIGN(CpuProfile); |
246 }; | 257 }; |
247 | 258 |
248 | 259 |
249 class CodeMap { | 260 class CodeMap { |
250 public: | 261 public: |
251 CodeMap() : next_shared_id_(1) { } | 262 CodeMap() : next_shared_id_(1) { } |
252 void AddCode(Address addr, CodeEntry* entry, unsigned size); | 263 void AddCode(Address addr, CodeEntry* entry, unsigned size); |
253 void MoveCode(Address from, Address to); | 264 void MoveCode(Address from, Address to); |
254 CodeEntry* FindEntry(Address addr); | 265 CodeEntry* FindEntry(Address addr, Address* start = NULL); |
255 int GetSharedId(Address addr); | 266 int GetSharedId(Address addr); |
256 | 267 |
257 void Print(); | 268 void Print(); |
258 | 269 |
259 private: | 270 private: |
260 struct CodeEntryInfo { | 271 struct CodeEntryInfo { |
261 CodeEntryInfo(CodeEntry* an_entry, unsigned a_size) | 272 CodeEntryInfo(CodeEntry* an_entry, unsigned a_size) |
262 : entry(an_entry), size(a_size) { } | 273 : entry(an_entry), size(a_size) { } |
263 CodeEntry* entry; | 274 CodeEntry* entry; |
264 unsigned size; | 275 unsigned size; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 CodeEntry* gc_entry_; | 433 CodeEntry* gc_entry_; |
423 SampleRateCalculator sample_rate_calc_; | 434 SampleRateCalculator sample_rate_calc_; |
424 | 435 |
425 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 436 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
426 }; | 437 }; |
427 | 438 |
428 | 439 |
429 } } // namespace v8::internal | 440 } } // namespace v8::internal |
430 | 441 |
431 #endif // V8_PROFILE_GENERATOR_H_ | 442 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |