Reviewers: loislo, Yang, danno,
Description:
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
Please review this at https://codereview.chromium.org/19591006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M include/v8.h
M src/d8.h
M src/d8.cc
M src/debug-debugger.js
M src/runtime.h
M src/runtime.cc
M test/cctest/test-log.cc
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
9ce05831b484c86c6cdc478ae8af2b1c5e0d5681..529597a771ed0c6209946bc01e3e918f9dbda9e7
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4545,18 +4545,18 @@ class V8EXPORT V8 {
* 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.
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
e576e9cb3708e1c096ec52a5ecbdffb7b9bae436..5343174d1741489877f29ecfc9885fa568fc506f
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -457,16 +457,6 @@ void Shell::Write(const
v8::FunctionCallbackInfo<v8::Value>& args) {
}
-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) {
String::Utf8Value file(args[0]);
if (*file == NULL) {
@@ -857,10 +847,6 @@ Handle<ObjectTemplate>
Shell::CreateGlobalTemplate(Isolate* isolate) {
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();
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index
804cc4655f18a76e5edead347d7ff555544ff81f..4f04342cf4dffb267776901f512f46d4fde1e5a4
100644
--- a/src/d8.h
+++ b/src/d8.h
@@ -317,8 +317,6 @@ class Shell : public i::AllStatic {
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);
Index: src/debug-debugger.js
diff --git a/src/debug-debugger.js b/src/debug-debugger.js
index
88efbe212af13330561b60f0e3dff36fdf4e3e05..a588b4c21d79d0a12e9163505471cb48191bb520
100644
--- a/src/debug-debugger.js
+++ b/src/debug-debugger.js
@@ -1469,8 +1469,6 @@
DebugCommandProcessor.prototype.processDebugJSONRequest = function(
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.versionRequest_ =
function(request, response) {
};
-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) {
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
c36d453d03e0cb7c8b72dd36ed9aeb379a1b5698..0c88cae9c3151c2ceb22d0268892ca63869ed073
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -13345,20 +13345,6 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_GetHeapUsage) {
#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
Index: src/runtime.h
diff --git a/src/runtime.h b/src/runtime.h
index
a8c10d92d5ecc31fafdf3c7f072d086787af375e..2fe9b0e39af553cd4bc0d925fb64f0f577c33b82
100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -467,10 +467,7 @@ namespace internal {
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
Index: test/cctest/test-log.cc
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index
81cb001b136ca198b3d37964174c80d8f32626c5..bf1151e59b4175b0c55e98083fcb1a5dc3badf7a
100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -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.