node icon indicating copy to clipboard operation
node copied to clipboard

Add support for track_gc_object_stats

Open kwasimensah opened this issue 1 year ago • 0 comments

What is the problem this feature will solve?

Currently the advice in https://v8.dev/docs/trace doesn't work with node i.e. nvm run --preserve-symlinks --preserve-symlinks-main --track_gc_object_stats --noincremental-marking --trace-event-categories disabled-by-default-v8 script.js does not output anything useful (see old issue https://github.com/nodejs/diagnostics/issues/104)

Fixing this would give developers a better way to debug/optimize allocations

What is the feature you are proposing to solve the problem?

Add support for track_gc_object_stats ala a new V* Options entry like https://github.com/nodejs/node/blob/f136e7ec312e2a0d3e7cba0b68f0aa92efdfeede/src/node_options.cc#L683

I'm not completely sure why but "--track_gc_object_stats" currently silently fails. It's not flagged as a bad option by https://github.com/nodejs/node/blob/b6971602564fc93c536ad469947536b487c968ea/src/node.cc#L855

What alternatives have you considered?

Not sure what alternatives there would be for this

kwasimensah avatar Aug 08 '22 15:08 kwasimensah