Commit 8c5e2d75 authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

[cpu-profiler] Deprecate Isolate::GetCpuProfiler and CpuProfiler::CollectSample functions.

BUG=v8:7070

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I92d7c61afa88e0a52c8eed0c2a44a4e49847e83b
Reviewed-on: https://chromium-review.googlesource.com/767618Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49514}
parent 44c52f7b
......@@ -329,7 +329,8 @@ class V8_EXPORT CpuProfiler {
* Recording the forced sample does not contribute to the aggregated
* profile statistics.
*/
void CollectSample();
V8_DEPRECATED("Use static CollectSample(Isolate*) instead.",
void CollectSample());
/**
* Tells the profiler whether the embedder is idle.
......
......@@ -7312,8 +7312,8 @@ class V8_EXPORT Isolate {
* is initialized. It is the embedder's responsibility to stop all CPU
* profiling activities if it has started any.
*/
V8_DEPRECATE_SOON("CpuProfiler should be created with CpuProfiler::New call.",
CpuProfiler* GetCpuProfiler());
V8_DEPRECATED("CpuProfiler should be created with CpuProfiler::New call.",
CpuProfiler* GetCpuProfiler());
/** Returns true if this isolate has a current context. */
bool InContext();
......
......@@ -74,7 +74,7 @@ void ProfilerExtension::StopProfiling(
void ProfilerExtension::CollectSample(
const v8::FunctionCallbackInfo<v8::Value>& args) {
profiler_->CollectSample();
v8::CpuProfiler::CollectSample(args.GetIsolate());
}
} // namespace internal
......
......@@ -1473,7 +1473,7 @@ static const char* js_force_collect_sample_source =
"}";
static void CallCollectSample(const v8::FunctionCallbackInfo<v8::Value>& info) {
i::ProfilerExtension::profiler()->CollectSample();
v8::CpuProfiler::CollectSample(info.GetIsolate());
}
TEST(CollectSampleAPI) {
......
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