| Index: src/sampler.h
|
| diff --git a/src/sampler.h b/src/sampler.h
|
| index a47a3635dda99bddc5646f02da561cc8a2d44d1c..80ccc087cadff8c17a0c73b8ce913836a1fc89e3 100644
|
| --- a/src/sampler.h
|
| +++ b/src/sampler.h
|
| @@ -103,8 +103,13 @@ class Sampler {
|
| bool IsActive() const { return NoBarrier_Load(&active_); }
|
|
|
| // Used in tests to make sure that stack sampling is performed.
|
| - int samples_taken() const { return samples_taken_; }
|
| - void ResetSamplesTaken() { samples_taken_ = 0; }
|
| + unsigned js_and_external_sample_count() const {
|
| + return js_and_external_sample_count_;
|
| + }
|
| + void StartCountingSamples() {
|
| + is_counting_samples_ = true;
|
| + js_and_external_sample_count_ = 0;
|
| + }
|
|
|
| class PlatformData;
|
| PlatformData* platform_data() const { return data_; }
|
| @@ -122,7 +127,9 @@ class Sampler {
|
| Atomic32 profiling_;
|
| Atomic32 active_;
|
| PlatformData* data_; // Platform specific data.
|
| - int samples_taken_; // Counts stack samples taken.
|
| + bool is_counting_samples_;
|
| + // Counts stack samples taken in JS VM state.
|
| + unsigned js_and_external_sample_count_;
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
|
| };
|
|
|
|
|