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

Unified Diff: src/sampler.h

Issue 18418004: Improve test-cpu-profiler.cc tests stability (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/sampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | src/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698