Revision: 15828
Author:   [email protected]
Date:     Tue Jul 23 06:44:15 2013
Log:      Deprecate v8::V8::Pause/ResumeProfiler

The methods were added to the public API in r1185 when Chrome DevTools were using the same output as produced for tick processor when --prof option is specified.

I don't see any existing clients of these methods and since they add a noticeable complexity to the profiler code I'd like to remove them.

BUG=None
[email protected]

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

Modified:
 /branches/bleeding_edge/include/v8.h
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/src/d8.h
 /branches/bleeding_edge/src/debug-debugger.js
 /branches/bleeding_edge/src/runtime.cc
 /branches/bleeding_edge/src/runtime.h
 /branches/bleeding_edge/test/cctest/test-log.cc

=======================================
--- /branches/bleeding_edge/include/v8.h        Fri Jul 12 17:20:40 2013
+++ /branches/bleeding_edge/include/v8.h        Tue Jul 23 06:44:15 2013
@@ -4545,18 +4545,18 @@
    * See also the --prof and --prof_auto command line switches to
    * enable V8 profiling.
    */
-  static void PauseProfiler();
+  V8_DEPRECATED(static void PauseProfiler());

   /**
    * Resumes recording of tick samples in the profiler.
    * See also PauseProfiler().
    */
-  static void ResumeProfiler();
+  V8_DEPRECATED(static void ResumeProfiler());

   /**
    * Return whether profiler is currently paused.
    */
-  static bool IsProfilerPaused();
+  V8_DEPRECATED(static bool IsProfilerPaused());

   /**
    * Retrieve the V8 thread id of the calling thread.
=======================================
--- /branches/bleeding_edge/src/d8.cc   Fri Jul 19 02:38:18 2013
+++ /branches/bleeding_edge/src/d8.cc   Tue Jul 23 06:44:15 2013
@@ -455,16 +455,6 @@
     }
   }
 }
-
-
-void Shell::EnableProfiler(const v8::FunctionCallbackInfo<v8::Value>& args) {
-  V8::ResumeProfiler();
-}
-
-
-void Shell::DisableProfiler(const v8::FunctionCallbackInfo<v8::Value>& args) {
-  V8::PauseProfiler();
-}


 void Shell::Read(const v8::FunctionCallbackInfo<v8::Value>& args) {
@@ -857,10 +847,6 @@
   global_template->Set(String::New("load"), FunctionTemplate::New(Load));
   global_template->Set(String::New("quit"), FunctionTemplate::New(Quit));
global_template->Set(String::New("version"), FunctionTemplate::New(Version));
-  global_template->Set(String::New("enableProfiler"),
-                       FunctionTemplate::New(EnableProfiler));
-  global_template->Set(String::New("disableProfiler"),
-                       FunctionTemplate::New(DisableProfiler));

   // Bind the Realm object.
   Handle<ObjectTemplate> realm_template = ObjectTemplate::New();
=======================================
--- /branches/bleeding_edge/src/d8.h    Wed Jun  5 05:36:33 2013
+++ /branches/bleeding_edge/src/d8.h    Tue Jul 23 06:44:15 2013
@@ -317,8 +317,6 @@
   static void Write(const v8::FunctionCallbackInfo<v8::Value>& args);
   static void Quit(const v8::FunctionCallbackInfo<v8::Value>& args);
   static void Version(const v8::FunctionCallbackInfo<v8::Value>& args);
- static void EnableProfiler(const v8::FunctionCallbackInfo<v8::Value>& args); - static void DisableProfiler(const v8::FunctionCallbackInfo<v8::Value>& args);
   static void Read(const v8::FunctionCallbackInfo<v8::Value>& args);
   static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value>& args);
   static Handle<String> ReadFromStdin(Isolate* isolate);
=======================================
--- /branches/bleeding_edge/src/debug-debugger.js       Mon Jul  1 06:44:10 2013
+++ /branches/bleeding_edge/src/debug-debugger.js       Tue Jul 23 06:44:15 2013
@@ -1469,8 +1469,6 @@
         this.suspendRequest_(request, response);
       } else if (request.command == 'version') {
         this.versionRequest_(request, response);
-      } else if (request.command == 'profile') {
-        this.profileRequest_(request, response);
       } else if (request.command == 'changelive') {
         this.changeLiveRequest_(request, response);
       } else if (request.command == 'restartframe') {
@@ -2400,18 +2398,6 @@
 };


-DebugCommandProcessor.prototype.profileRequest_ = function(request, response) {
-  if (request.arguments.command == 'resume') {
-    %ProfilerResume();
-  } else if (request.arguments.command == 'pause') {
-    %ProfilerPause();
-  } else {
-    return response.failed('Unknown command');
-  }
-  response.body = {};
-};
-
-
 DebugCommandProcessor.prototype.changeLiveRequest_ = function(
     request, response) {
   if (!request.arguments) {
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Mon Jul 22 02:16:33 2013
+++ /branches/bleeding_edge/src/runtime.cc      Tue Jul 23 06:44:15 2013
@@ -13345,20 +13345,6 @@
 #endif  // ENABLE_DEBUGGER_SUPPORT


-RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerResume) {
-  SealHandleScope shs(isolate);
-  v8::V8::ResumeProfiler();
-  return isolate->heap()->undefined_value();
-}
-
-
-RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerPause) {
-  SealHandleScope shs(isolate);
-  v8::V8::PauseProfiler();
-  return isolate->heap()->undefined_value();
-}
-
-
 // Finds the script object from the script data. NOTE: This operation uses
 // heap traversal to find the function generated for the source position
// for the requested break point. For lazily compiled functions several heap
=======================================
--- /branches/bleeding_edge/src/runtime.h       Mon Jul 22 02:16:33 2013
+++ /branches/bleeding_edge/src/runtime.h       Tue Jul 23 06:44:15 2013
@@ -467,10 +467,7 @@
   F(TransitionElementsKind, 2, 1) \
   F(TransitionElementsSmiToDouble, 1, 1) \
   F(TransitionElementsDoubleToObject, 1, 1) \
-  F(HaveSameMap, 2, 1) \
-  /* profiler */ \
-  F(ProfilerResume, 0, 1) \
-  F(ProfilerPause, 0, 1)
+  F(HaveSameMap, 2, 1)


 #ifdef ENABLE_DEBUGGER_SUPPORT
=======================================
--- /branches/bleeding_edge/test/cctest/test-log.cc     Thu Jul 18 10:19:31 2013
+++ /branches/bleeding_edge/test/cctest/test-log.cc     Tue Jul 23 06:44:15 2013
@@ -27,6 +27,7 @@
 //
 // Tests of logging functions from log.h

+#define V8_DISABLE_DEPRECATIONS 1
 #ifdef __linux__
 #include <pthread.h>
 #include <signal.h>
@@ -43,6 +44,7 @@
 #include "v8utils.h"
 #include "cctest.h"
 #include "vm-state-inl.h"
+#undef V8_DISABLE_DEPRECATIONS

 using v8::internal::Address;
 using v8::internal::EmbeddedVector;

--
--
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