-
Notifications
You must be signed in to change notification settings - Fork 78
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
perf are deprecated on node 8 or above? #407
Comments
tl;dr Note that the issue is from early 2018, a lot has changes since then, but let me try to give some context. Let's start with the state of affairs pre-Node.js v8.x. Prior to Node.js v8.x, all JavaScript code ran by V8 was Just-in-Time (JIT) compiled, which means all JS code would become native code. The old compiler pipeline V8 used back then (Crankshaft) had several performance pitfalls, was hard to extend for new ECMAScript features, and as mentioned before was JIT-only, which prevented it from running on restricted environments where executing JIT code is disallowed (iOS has this restriction). Starting with Node.js v8.x, V8 introduced a new compiler pipeline (TurboFan + Ignition) which is a interpreter + JIT compiler: all JS code is first loaded and executed by the interpreter, which will collect execution information so that V8 can optimize the code later and compile it using the JIT compiler. This new pipeline came with a huge performance improvement and is a lot simpler to extend than the old one. How does this new pipeline affects V8's recommendation always was to use the V8 CPU Profiler to profile JavaScript code, which works when JS is the only thing running and the bottleneck is on JS. Therefore, it should work for most users. But there's a subset of users who still need We worked with V8 on a workaround for the incompatibility between We also worked with V8 to introduce a new C++ API which allows embedders (such as Node.js or native modules) to implement the same behavior from So yes, technically it is deprecated, but everything is working on all current release lines of Node.js (v10.x, v12.x v14.x). |
Well, thanks so much for the reply. All the doubts are done. |
Hello everyone.
I currently use
perf
to get stackframes of my application to improve the performance of it.But in this issue: #148
Is
perf
already deprecated? How I can still get the stackframes and generates graphs of CPU profiler withoutperf
?Thanks!
The text was updated successfully, but these errors were encountered: