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

Unified Diff: src/platform.h

Issue 5325003: Simplify ProfLazyMode test on Linux. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/log.cc ('k') | src/platform-freebsd.cc » ('j') | test/cctest/test-log.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « src/log.cc ('k') | src/platform-freebsd.cc » ('j') | test/cctest/test-log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698