Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v9.x backport] src: fix GetCpuProfiler() deprecation warning #18959

Closed
wants to merge 1 commit into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Feb 23, 2018

Replace v8::Isolate::GetCpuProfiler() with v8::CpuProfiler::New()
and cache the instance; creating and disposing an instance every loop
tick is too expensive.

PR-URL: #18534
Fixes: #18039
Reviewed-By: James M Snell jasnell@gmail.com
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Anna Henningsen anna@addaleax.net
Reviewed-By: Gireesh Punathil gpunathi@in.ibm.com
Reviewed-By: Daniel Bevenius daniel.bevenius@gmail.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

Replace `v8::Isolate::GetCpuProfiler()` with `v8::CpuProfiler::New()`
and cache the instance; creating and disposing an instance every loop
tick is too expensive.

PR-URL: nodejs#18534
Fixes: nodejs#18039
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. v9.x labels Feb 23, 2018
@danbev
Copy link
Contributor Author

danbev commented Feb 23, 2018

@MylesBorins
Copy link
Contributor

Some failures, checking again: https://ci.nodejs.org/job/node-test-pull-request/13383/

addaleax pushed a commit that referenced this pull request Feb 27, 2018
Replace `v8::Isolate::GetCpuProfiler()` with `v8::CpuProfiler::New()`
and cache the instance; creating and disposing an instance every loop
tick is too expensive.

Backport-PR-URL: #18959
PR-URL: #18534
Fixes: #18039
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@addaleax
Copy link
Member

Landed on v9.x-staging

@addaleax addaleax closed this Feb 27, 2018
@danbev danbev deleted the backport-18534-to-v9.x branch March 27, 2018 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants