Skip to content

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 [email protected]
Reviewed-By: Colin Ihrig [email protected]
Reviewed-By: Anna Henningsen [email protected]
Reviewed-By: Gireesh Punathil [email protected]
Reviewed-By: Daniel Bevenius [email protected]

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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
@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

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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
@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