Commit dcb24e3b authored by Anna Henningsen's avatar Anna Henningsen Committed by James M Snell
Browse files

src: keep track of env properly in node_perf.cc

Currently, measuring GC timing using `node_perf` is somewhat broken,
because Isolates and Node Environments do not necessarily match 1:1;
each environment adds its own hook, so possibly the hook code runs
multiple times, but since it can’t reliably compute its corresponding
event loop based on the Isolate, each run targets the same Environment
right now.

This fixes that problem by using new overloads of the GC tracking
APIs that can pass data to the callback through opaque pointers.

PR-URL: https://github.com/nodejs/node/pull/15391


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
parent 8403d6b9
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