Skip to content

Commit

Permalink
src: keep track of env properly in node_perf.cc
Browse files Browse the repository at this point in the history
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: nodejs/node#15391
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
addaleax authored and Stephen Belanger committed Sep 21, 2017
1 parent 335588a commit 1552766
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 1552766

Please sign in to comment.