Chromium Code Reviews| Index: src/platform.h |
| diff --git a/src/platform.h b/src/platform.h |
| index 42e6eae93e284f3786cffb87805ac430cc3f65e3..1d8cf8adc3ced71d1fa94f87649cf29d9671d13a 100644 |
| --- a/src/platform.h |
| +++ b/src/platform.h |
| @@ -554,7 +554,7 @@ class TickSample { |
| class Sampler { |
| public: |
| // Initialize sampler. |
| - explicit Sampler(int interval, bool profiling); |
| + Sampler(int interval, bool profiling); |
| virtual ~Sampler(); |
| // Performs stack sampling. |
| @@ -580,6 +580,10 @@ class Sampler { |
| // Whether the sampler is running (that is, consumes resources). |
| bool IsActive() const { return active_; } |
| + unsigned int samples_taken() { return samples_taken_; } |
|
Vitaly Repeshko
2010/11/25 15:01:20
Please document what this counter means and that i
mnaganov (inactive)
2010/11/25 15:26:56
Done.
|
| + void inc_samples_taken() { ++samples_taken_; } |
|
Vitaly Repeshko
2010/11/25 15:01:20
Do we have to expose increment? Can't we do this b
mnaganov (inactive)
2010/11/25 15:26:56
Ticker is a module-private class, it can't be used
|
| + void reset_samples_taken() { samples_taken_ = 0; } |
| + |
| class PlatformData; |
| private: |
| @@ -588,6 +592,7 @@ class Sampler { |
| const bool synchronous_; |
| bool active_; |
| PlatformData* data_; // Platform specific data. |
| + unsigned int samples_taken_; |
|
Vitaly Repeshko
2010/11/25 15:01:20
Unsigned is banned by the style guide (http://goog
mnaganov (inactive)
2010/11/25 15:26:56
I care about the possibility of having negative va
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| }; |