Commit f02b74df authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Daniel Bevenius
Browse files

src: fix GetCpuProfiler() deprecation warning

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: https://github.com/nodejs/node/pull/18534
Fixes: https://github.com/nodejs/node/issues/18039


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarGireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
parent 4a881e04
Supports Markdown
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