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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 void AddPath(const Vector<CodeEntry*>& path); | 195 void AddPath(const Vector<CodeEntry*>& path); |
196 void CalculateTotalTicksAndSamplingRate(); | 196 void CalculateTotalTicksAndSamplingRate(); |
197 | 197 |
198 const char* title() const { return title_; } | 198 const char* title() const { return title_; } |
199 unsigned uid() const { return uid_; } | 199 unsigned uid() const { return uid_; } |
200 const ProfileTree* top_down() const { return &top_down_; } | 200 const ProfileTree* top_down() const { return &top_down_; } |
201 | 201 |
202 int samples_count() const { return samples_.length(); } | 202 int samples_count() const { return samples_.length(); } |
203 ProfileNode* sample(int index) const { return samples_.at(index); } | 203 ProfileNode* sample(int index) const { return samples_.at(index); } |
204 | 204 |
205 Time start_time() const { return start_time_; } | 205 int64_t start_time_us() const { return start_time_us_; } |
206 Time end_time() const { return end_time_; } | 206 int64_t end_time_us() const { return end_time_us_; } |
207 | 207 |
208 void UpdateTicksScale(); | 208 void UpdateTicksScale(); |
209 | 209 |
210 void Print(); | 210 void Print(); |
211 | 211 |
212 private: | 212 private: |
213 const char* title_; | 213 const char* title_; |
214 unsigned uid_; | 214 unsigned uid_; |
215 bool record_samples_; | 215 bool record_samples_; |
216 Time start_time_; | 216 int64_t start_time_us_; |
217 Time end_time_; | 217 int64_t end_time_us_; |
218 ElapsedTimer timer_; | |
219 List<ProfileNode*> samples_; | 218 List<ProfileNode*> samples_; |
220 ProfileTree top_down_; | 219 ProfileTree top_down_; |
221 | 220 |
222 DISALLOW_COPY_AND_ASSIGN(CpuProfile); | 221 DISALLOW_COPY_AND_ASSIGN(CpuProfile); |
223 }; | 222 }; |
224 | 223 |
225 | 224 |
226 class CodeMap { | 225 class CodeMap { |
227 public: | 226 public: |
228 CodeMap() : next_shared_id_(1) { } | 227 CodeMap() : next_shared_id_(1) { } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 CodeEntry* gc_entry_; | 343 CodeEntry* gc_entry_; |
345 CodeEntry* unresolved_entry_; | 344 CodeEntry* unresolved_entry_; |
346 | 345 |
347 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 346 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
348 }; | 347 }; |
349 | 348 |
350 | 349 |
351 } } // namespace v8::internal | 350 } } // namespace v8::internal |
352 | 351 |
353 #endif // V8_PROFILE_GENERATOR_H_ | 352 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |