[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/767618
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49514}
This commit is contained in:
Alexei Filippov 2017-11-14 12:23:15 -08:00 committed by Commit Bot
parent 44c52f7bb5
commit 8c5e2d758d
4 changed files with 6 additions and 5 deletions

View File

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

View File

@ -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();

View File

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

View File

@ -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) {