consider reintroduce perf-prof support for macOS

Abierto
#652 3 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
28/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript, node.js, rust

Línea de trabajo

Start by reviewing the V8 change that removed perf-prof support and the referenced Node.js v8-perf-maps patch, then compare how macOS jitdump support works in JavaScriptCore and SpiderMonkey. Done means establishing whether Node.js can reintroduce macOS perf-prof support so mixed Rust and JavaScript profiles can be analyzed with samply.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I'm a maintainer of Rspack, and one of our major challenges is identifying performance bottlenecks in user projects during the build process.

Rspack extensively utilizes node-api, resulting in frequent Rust-JavaScript communication (we support JS loaders and plugins via node-api). Currently, we use cpu-profile to debug JavaScript performance issues and samply for Rust performance issues. However, bottlenecks often span both Rust and JavaScript, making it difficult to analyze using two separate profiling tools.

I recently discovered that samply supports jitdump, which can remap native frames to JavaScript frames, allowing us to analyze performance within a single tool. Unfortunately, Node.js only supports perf-prof on Linux. While debugging on Linux is possible, it's not ideal since most of our internal developers use macOS, and it's impractical to ask users to install Linux solely for generating these profiles.

Upon investigation, I found that perf-prof support was removed in V8 to fix fuzzer tests (https://chromium-review.googlesource.com/c/v8/v8/+/1993969). However, Node.js can support perf-prof with a minor patch. Although the patch isn't perfect, it demonstrates that macOS support is still feasible.

Both JavaScriptCore and SpiderMonkey support jitdump on macOS. I'm wondering if Node.js could reintroduce perf-prof support for macOS, as it would be incredibly useful for profiling JavaScript compiler tools that heavily rely on node-api, such as Rspack, Rolldown, Next.js, SWC and others.

Lenguaje dominante
Sin datos de lenguaje
Estrellas
550
Forks
69
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nodejs/diagnostics

Todos los issues de nodejs/diagnostics

Issues similares

Más issues de DevTools

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.