Commit 682a0d65 authored by yurys@chromium.org's avatar yurys@chromium.org

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
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/19591006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8cbbdd06
......@@ -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.
......
......@@ -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();
......
......@@ -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);
......
......@@ -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) {
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment