Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: src/counters.h

Issue 2461003002: [profiler] Emit runtime call stats into sampling profile (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/profiler/cpu-profiler.cc » ('j') | src/profiler/profile-generator.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_COUNTERS_H_ 5 #ifndef V8_COUNTERS_H_
6 #define V8_COUNTERS_H_ 6 #define V8_COUNTERS_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 base::TimeDelta time; 492 base::TimeDelta time;
493 }; 493 };
494 494
495 // RuntimeCallTimer is used to keep track of the stack of currently active 495 // RuntimeCallTimer is used to keep track of the stack of currently active
496 // timers used for properly measuring the own time of a RuntimeCallCounter. 496 // timers used for properly measuring the own time of a RuntimeCallCounter.
497 class RuntimeCallTimer { 497 class RuntimeCallTimer {
498 public: 498 public:
499 RuntimeCallTimer() {} 499 RuntimeCallTimer() {}
500 RuntimeCallCounter* counter() { return counter_; } 500 RuntimeCallCounter* counter() { return counter_; }
501 base::ElapsedTimer timer() { return timer_; } 501 base::ElapsedTimer timer() { return timer_; }
502 RuntimeCallTimer* parent() const { return parent_; }
502 503
503 private: 504 private:
504 friend class RuntimeCallStats; 505 friend class RuntimeCallStats;
505 506
506 inline void Start(RuntimeCallCounter* counter, RuntimeCallTimer* parent) { 507 inline void Start(RuntimeCallCounter* counter, RuntimeCallTimer* parent) {
507 counter_ = counter; 508 counter_ = counter;
508 parent_ = parent; 509 parent_ = parent;
509 timer_.Start(); 510 timer_.Start();
510 } 511 }
511 512
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 } 1275 }
1275 1276
1276 Isolate* isolate_ = nullptr; 1277 Isolate* isolate_ = nullptr;
1277 RuntimeCallTimer timer_; 1278 RuntimeCallTimer timer_;
1278 }; 1279 };
1279 1280
1280 } // namespace internal 1281 } // namespace internal
1281 } // namespace v8 1282 } // namespace v8
1282 1283
1283 #endif // V8_COUNTERS_H_ 1284 #endif // V8_COUNTERS_H_
OLDNEW
« no previous file with comments | « no previous file | src/profiler/cpu-profiler.cc » ('j') | src/profiler/profile-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698