| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 | 203 |
| 204 class CpuProfile { | 204 class CpuProfile { |
| 205 public: | 205 public: |
| 206 CpuProfile(const char* title, unsigned uid, bool record_samples); | 206 CpuProfile(const char* title, unsigned uid, bool record_samples); |
| 207 | 207 |
| 208 // Add pc -> ... -> main() call path to the profile. | 208 // Add pc -> ... -> main() call path to the profile. |
| 209 void AddPath(const Vector<CodeEntry*>& path); | 209 void AddPath(const Vector<CodeEntry*>& path); |
| 210 void CalculateTotalTicksAndSamplingRate(); | 210 void CalculateTotalTicksAndSamplingRate(); |
| 211 | 211 |
| 212 INLINE(const char* title() const) { return title_; } | 212 const char* title() const { return title_; } |
| 213 INLINE(unsigned uid() const) { return uid_; } | 213 unsigned uid() const { return uid_; } |
| 214 INLINE(const ProfileTree* top_down() const) { return &top_down_; } | 214 const ProfileTree* top_down() const { return &top_down_; } |
| 215 | 215 |
| 216 INLINE(int samples_count() const) { return samples_.length(); } | 216 int samples_count() const { return samples_.length(); } |
| 217 INLINE(ProfileNode* sample(int index) const) { return samples_.at(index); } | 217 ProfileNode* sample(int index) const { return samples_.at(index); } |
| 218 |
| 219 double start_time_ms() const { return start_time_ms_; } |
| 220 double end_time_ms() const { return end_time_ms_; } |
| 218 | 221 |
| 219 void UpdateTicksScale(); | 222 void UpdateTicksScale(); |
| 220 | 223 |
| 221 void ShortPrint(); | 224 void ShortPrint(); |
| 222 void Print(); | 225 void Print(); |
| 223 | 226 |
| 224 private: | 227 private: |
| 225 const char* title_; | 228 const char* title_; |
| 226 unsigned uid_; | 229 unsigned uid_; |
| 227 bool record_samples_; | 230 bool record_samples_; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 CodeEntry* gc_entry_; | 356 CodeEntry* gc_entry_; |
| 354 CodeEntry* unresolved_entry_; | 357 CodeEntry* unresolved_entry_; |
| 355 | 358 |
| 356 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 359 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
| 357 }; | 360 }; |
| 358 | 361 |
| 359 | 362 |
| 360 } } // namespace v8::internal | 363 } } // namespace v8::internal |
| 361 | 364 |
| 362 #endif // V8_PROFILE_GENERATOR_H_ | 365 #endif // V8_PROFILE_GENERATOR_H_ |
| OLD | NEW |