Reviewers: Vitaly, zarko,

Description:
[Isolates] Move Profiler::paused_ into non-static members.
Preparatory to moving profilers to be per-isolate.

Please review this at http://codereview.chromium.org/2810019/show

Affected files:
  M src/log.cc


Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 460e557762e7aff860c6edb60571841b5a84242b..0a0883b99c1821f39de419b27e1dfe2bd86d30c4 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -109,9 +109,9 @@ class Profiler: public Thread {
   void Run();

   // Pause and Resume TickSample data collection.
-  static bool paused() { return paused_; }
-  static void pause() { paused_ = true; }
-  static void resume() { paused_ = false; }
+  bool paused() { return paused_; }
+  void pause() { paused_ = true; }
+  void resume() { paused_ = false; }

  private:
   // Returns the next index in the cyclic buffer.
@@ -133,11 +133,9 @@ class Profiler: public Thread {
   bool running_;

   // Tells whether we are currently recording tick samples.
-  static bool paused_;
+  bool paused_;
 };

-bool Profiler::paused_ = false;
-

 //
 // StackTracer implementation
@@ -262,7 +260,8 @@ Profiler::Profiler()
       overflow_(false),
       buffer_semaphore_(OS::CreateSemaphore(0)),
       engaged_(false),
-      running_(false) {
+      running_(false),
+      paused_(false) {
 }




--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to