You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the Environment fields are not tracked by the heap snapshot (unless they are referenced by some other objects that implements the MemoryRetainer interface) - for example, you can't see any of the AliasedBuffer in the Environment when looking at a heap snapshot taken after bootstrap. Considering the amount of things we attach to the Environment, it should be pretty useful to track those fields in the heap snapshot instead of keeping them invisible for no particular reason.
I am thinking about having Environment implmement MemoryRetainer, are there any concerns around having it inherit from an abstract class? (considering this is semi-exposed to embedders).
@joyeecheung - will this enable a debugger (like llnode) walk through the reference chains of C++ objects, starting with a JS object? the use case is debugging native memory leaks, that has JS objects as anchors.
@gireeshpunathil I don't think it's going to be useful for llnode, but it adds more information into the heap snapshots (essentially allowing the heap snapshots to track C++ memory as well)
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Activity
joyeecheung commentedon Mar 19, 2019
cc @nodejs/embedders
src: move AsyncHooks out of Environment
src: move AsyncCallbackScope out of Environment
src: move ImmediateInfo out of Environment
src: move TickInfo out of Environment
src: move TrackingTraceStateObserver out of Environment
src: move ShouldNotAbortOnUncaughtScope out of Environment
10 remaining items
src: move AsyncHooks out of Environment
src: move AsyncCallbackScope out of Environment
src: move ImmediateInfo out of Environment
src: move TickInfo out of Environment
src: move TrackingTraceStateObserver out of Environment
src: move ShouldNotAbortOnUncaughtScope out of Environment
src: implement MemoryRetainer in Environment
src: implement MemoryRetainer in Environment
gireeshpunathil commentedon Jan 7, 2020
@joyeecheung - will this enable a debugger (like llnode) walk through the reference chains of C++ objects, starting with a JS object? the use case is debugging native memory leaks, that has JS objects as anchors.
joyeecheung commentedon Jan 7, 2020
@gireeshpunathil I don't think it's going to be useful for llnode, but it adds more information into the heap snapshots (essentially allowing the heap snapshots to track C++ memory as well)
github-actions commentedon Jun 27, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Jul 28, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.