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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // Add pc -> ... -> main() call path to the profile. | 201 // Add pc -> ... -> main() call path to the profile. |
202 void AddPath(const Vector<CodeEntry*>& path); | 202 void AddPath(const Vector<CodeEntry*>& path); |
203 void CalculateTotalTicksAndSamplingRate(); | 203 void CalculateTotalTicksAndSamplingRate(); |
204 | 204 |
205 const char* title() const { return title_; } | 205 const char* title() const { return title_; } |
206 const ProfileTree* top_down() const { return &top_down_; } | 206 const ProfileTree* top_down() const { return &top_down_; } |
207 | 207 |
208 int samples_count() const { return samples_.length(); } | 208 int samples_count() const { return samples_.length(); } |
209 ProfileNode* sample(int index) const { return samples_.at(index); } | 209 ProfileNode* sample(int index) const { return samples_.at(index); } |
210 | 210 |
211 Time start_time() const { return start_time_; } | 211 TimeTicks start_time() const { return start_time_; } |
212 Time end_time() const { return end_time_; } | 212 TimeTicks end_time() const { return end_time_; } |
213 | 213 |
214 void UpdateTicksScale(); | 214 void UpdateTicksScale(); |
215 | 215 |
216 void Print(); | 216 void Print(); |
217 | 217 |
218 private: | 218 private: |
219 const char* title_; | 219 const char* title_; |
220 bool record_samples_; | 220 bool record_samples_; |
221 Time start_time_; | 221 TimeTicks start_time_; |
222 Time end_time_; | 222 TimeTicks end_time_; |
223 ElapsedTimer timer_; | |
224 List<ProfileNode*> samples_; | 223 List<ProfileNode*> samples_; |
225 ProfileTree top_down_; | 224 ProfileTree top_down_; |
226 | 225 |
227 DISALLOW_COPY_AND_ASSIGN(CpuProfile); | 226 DISALLOW_COPY_AND_ASSIGN(CpuProfile); |
228 }; | 227 }; |
229 | 228 |
230 | 229 |
231 class CodeMap { | 230 class CodeMap { |
232 public: | 231 public: |
233 CodeMap() : next_shared_id_(1) { } | 232 CodeMap() : next_shared_id_(1) { } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 CodeEntry* gc_entry_; | 349 CodeEntry* gc_entry_; |
351 CodeEntry* unresolved_entry_; | 350 CodeEntry* unresolved_entry_; |
352 | 351 |
353 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 352 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
354 }; | 353 }; |
355 | 354 |
356 | 355 |
357 } } // namespace v8::internal | 356 } } // namespace v8::internal |
358 | 357 |
359 #endif // V8_PROFILE_GENERATOR_H_ | 358 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |