Node.js CPU Profiling

Existing Tools

  • V8 --prof
  • V8 CpuProfiler
  • External Profilers + --perf-basic-prof *

Challenges

  • V8 --prof / CpuProfiler
    • Collect native frames
    • Runtime toggling
      • Collecting existing code objects
    • Inlined Optimized Functions

Challenges

  • External profilers
    • --perf-basic-prof is not officially supported by V8
      • Runtime toggling
        • Collecting existing code objects
    • After the Turbofan update, interpreted frames are not distinguishable for external profilers
    • Inlined Optimized Functions
  • Create an API to replace --perf-basic-prof
  • Make interpreted frames distinguishable on the stack

Discussed Solutions

External Profilers

Discussed Solutions

External Profilers

Make interpreted frames distinguishable on the stack

Discussed Solutions

External Profilers

Make interpreted frames distinguishable on the stack (v8:959081)

Discussed Solutions

External Profilers

Create an API to replace --perf-basic-prof

  • Testing
  • Support
  • Release timeline

Next steps...

Node.js CPU Profiling Deep Dive

By Mary Marchini

Node.js CPU Profiling Deep Dive

  • 229