Skip to content

src: keep track of env properly in node_perf.cc#15391

Closed
addaleax wants to merge 3 commits intonodejs:masterfrom
addaleax:node-perf-env
Closed

src: keep track of env properly in node_perf.cc#15391
addaleax wants to merge 3 commits intonodejs:masterfrom
addaleax:node-perf-env

Conversation

@addaleax
Copy link
Member

First commit is to avoid conflicts with the second, the second commit is needed for the “real” one.


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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

deps/v8, src/node_perf

@nodejs/v8 @jasnell

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / src Issues and PRs related to general changes in the lib or src directory. performance Issues and PRs related to the performance of Node.js. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants