Commit f7b437d0 authored by yurys@chromium.org's avatar yurys@chromium.org

Deprecate Start/StopCpuProfiling methods

BUG=v8:3213
LOG=Y
R=alph@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0d1b90f8
......@@ -164,7 +164,9 @@ class V8_EXPORT CpuProfiler {
void StartProfiling(Handle<String> title, bool record_samples = false);
/** Deprecated. Use StartProfiling instead. */
void StartCpuProfiling(Handle<String> title, bool record_samples = false);
V8_DEPRECATED("Use StartProfiling",
void StartCpuProfiling(Handle<String> title,
bool record_samples = false));
/**
* Stops collecting CPU profile with a given title and returns it.
......@@ -173,7 +175,8 @@ class V8_EXPORT CpuProfiler {
CpuProfile* StopProfiling(Handle<String> title);
/** Deprecated. Use StopProfiling instead. */
const CpuProfile* StopCpuProfiling(Handle<String> title);
V8_DEPRECATED("Use StopProfiling",
const CpuProfile* StopCpuProfiling(Handle<String> title));
/**
* Tells the profiler whether the embedder is idle.
......
......@@ -34,7 +34,7 @@ namespace v8 {
namespace internal {
const v8::CpuProfile* ProfilerExtension::last_profile = NULL;
v8::CpuProfile* ProfilerExtension::last_profile = NULL;
const char* ProfilerExtension::kSource =
"native function startProfiling();"
"native function stopProfiling();";
......@@ -58,7 +58,7 @@ void ProfilerExtension::StartProfiling(
const v8::FunctionCallbackInfo<v8::Value>& args) {
last_profile = NULL;
v8::CpuProfiler* cpu_profiler = args.GetIsolate()->GetCpuProfiler();
cpu_profiler->StartCpuProfiling((args.Length() > 0)
cpu_profiler->StartProfiling((args.Length() > 0)
? args[0].As<v8::String>()
: v8::String::Empty(args.GetIsolate()));
}
......@@ -67,7 +67,7 @@ void ProfilerExtension::StartProfiling(
void ProfilerExtension::StopProfiling(
const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::CpuProfiler* cpu_profiler = args.GetIsolate()->GetCpuProfiler();
last_profile = cpu_profiler->StopCpuProfiling((args.Length() > 0)
last_profile = cpu_profiler->StopProfiling((args.Length() > 0)
? args[0].As<v8::String>()
: v8::String::Empty(args.GetIsolate()));
}
......
......@@ -43,7 +43,7 @@ class ProfilerExtension : public v8::Extension {
v8::Handle<v8::String> name);
static void StartProfiling(const v8::FunctionCallbackInfo<v8::Value>& args);
static void StopProfiling(const v8::FunctionCallbackInfo<v8::Value>& args);
static const v8::CpuProfile* last_profile;
static v8::CpuProfile* last_profile;
private:
static const char* kSource;
};
......
......@@ -93,7 +93,7 @@ void RunWithProfiler(void (*test)()) {
v8::String::NewFromUtf8(env->GetIsolate(), "my_profile1");
v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
cpu_profiler->StartCpuProfiling(profile_name);
cpu_profiler->StartProfiling(profile_name);
(*test)();
reinterpret_cast<i::CpuProfiler*>(cpu_profiler)->DeleteAllProfiles();
}
......
This diff is collapsed.
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