Revision: 14166
Author:   [email protected]
Date:     Mon Apr  8 08:09:03 2013
Log:      No need to start Ticker for Crankshaft

Crankshaft doesn't depend on the sampler thread any more. No
need to start the that thread for Crankshaft.

BUG=v8:2609

Review URL: https://codereview.chromium.org/13526003
http://code.google.com/p/v8/source/detail?r=14166

Modified:
 /branches/bleeding_edge/src/isolate.cc
 /branches/bleeding_edge/src/log.cc
 /branches/bleeding_edge/src/log.h
 /branches/bleeding_edge/src/runtime-profiler.cc

=======================================
--- /branches/bleeding_edge/src/isolate.cc      Mon Apr  8 06:10:59 2013
+++ /branches/bleeding_edge/src/isolate.cc      Mon Apr  8 08:09:03 2013
@@ -1808,7 +1808,8 @@
     if (FLAG_hydrogen_stats) GetHStatistics()->Print();

     // We must stop the logger before we tear down other components.
-    logger_->EnsureTickerStopped();
+    Sampler* sampler = logger_->sampler();
+    if (sampler && sampler->IsActive()) sampler->Stop();

     delete deoptimizer_data_;
     deoptimizer_data_ = NULL;
=======================================
--- /branches/bleeding_edge/src/log.cc  Tue Apr  2 00:53:50 2013
+++ /branches/bleeding_edge/src/log.cc  Mon Apr  8 08:09:03 2013
@@ -1558,11 +1558,6 @@
 void Logger::LogFailure() {
   PauseProfiler();
 }
-
-
-bool Logger::IsProfilerSamplerActive() {
-  return ticker_->IsActive();
-}


 class EnumerateOptimizedFunctionsVisitor: public OptimizedFunctionVisitor {
@@ -1935,17 +1930,6 @@
 Sampler* Logger::sampler() {
   return ticker_;
 }
-
-
-void Logger::EnsureTickerStarted() {
-  ASSERT(ticker_ != NULL);
-  if (!ticker_->IsActive()) ticker_->Start();
-}
-
-
-void Logger::EnsureTickerStopped() {
-  if (ticker_ != NULL && ticker_->IsActive()) ticker_->Stop();
-}


 FILE* Logger::TearDown() {
=======================================
--- /branches/bleeding_edge/src/log.h   Tue Apr  2 01:16:53 2013
+++ /branches/bleeding_edge/src/log.h   Mon Apr  8 08:09:03 2013
@@ -168,9 +168,6 @@
   void SetCodeEventHandler(uint32_t options,
                            JitCodeEventHandler event_handler);

-  void EnsureTickerStarted();
-  void EnsureTickerStopped();
-
   Sampler* sampler();

   // Frees resources acquired in SetUp.
@@ -448,9 +445,6 @@
   void UncheckedIntEvent(const char* name, int value);
   void UncheckedIntPtrTEvent(const char* name, intptr_t value);

-  // Returns whether profiler's sampler is active.
-  bool IsProfilerSamplerActive();
-
   Isolate* isolate_;

   // The sampler used by the profiler and the sliding state window.
=======================================
--- /branches/bleeding_edge/src/runtime-profiler.cc     Tue Mar 12 11:03:18 2013
+++ /branches/bleeding_edge/src/runtime-profiler.cc     Mon Apr  8 08:09:03 2013
@@ -389,9 +389,6 @@
   if (!FLAG_watch_ic_patching) {
     ClearSampleBuffer();
   }
-  // If the ticker hasn't already started, make sure to do so to get
-  // the ticks for the runtime profiler.
-  if (IsEnabled()) isolate_->logger()->EnsureTickerStarted();
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to