Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsolid: add support for start/stopTrackingHeapObjects #48

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

juanarbol
Copy link
Contributor

This patch implements triggers for startTrackingHeapObjects and stopTrackingHeapObjects in the heap profiler.

The implementation is based on what the inspector does:

The startTrackingHeapObjects will simply activate that in the HeapProfiler and; the stopTrackingHeapObjects will create a heap snapshot and deactivate the TrackingHeapObjects in the Heap profiler.

This patch also includes the trackAllocations option supported.

src/nsolid.h Show resolved Hide resolved
src/nsolid.h Outdated Show resolved Hide resolved
@juanarbol juanarbol force-pushed the juan/track-heap-objects branch 2 times, most recently from 5c84d29 to 69593d4 Compare December 20, 2023 04:24
src/nsolid.h Outdated Show resolved Hide resolved
src/nsolid/nsolid_heap_snapshot.cc Show resolved Hide resolved
src/nsolid.cc Outdated Show resolved Hide resolved
src/nsolid.cc Outdated Show resolved Hide resolved
src/nsolid/nsolid_heap_snapshot.cc Outdated Show resolved Hide resolved
src/nsolid.h Outdated Show resolved Hide resolved
src/nsolid/nsolid_heap_snapshot.cc Outdated Show resolved Hide resolved
src/nsolid.h Outdated Show resolved Hide resolved
src/nsolid.h Show resolved Hide resolved
src/nsolid/nsolid_heap_snapshot.cc Outdated Show resolved Hide resolved
src/nsolid/nsolid_heap_snapshot.cc Show resolved Hide resolved
src/nsolid/nsolid_heap_snapshot.cc Outdated Show resolved Hide resolved
Copy link
Member

@santigimeno santigimeno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very good

test/addons/nsolid-track-heap-objects/binding.cc Outdated Show resolved Hide resolved
test/addons/nsolid-track-heap-objects/binding.cc Outdated Show resolved Hide resolved
Copy link
Contributor Author

@juanarbol juanarbol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The next revision addresses all the comments except the "emplace and check" in the thread map for heap snapshots due to a crash.

src/nsolid/nsolid_heap_snapshot.cc Show resolved Hide resolved
src/nsolid/nsolid_heap_snapshot.cc Outdated Show resolved Hide resolved
@juanarbol juanarbol force-pushed the juan/track-heap-objects branch 2 times, most recently from f187b72 to e2857cb Compare February 5, 2024 13:26
@juanarbol juanarbol changed the title agents: add support for start/stopTrackingHeapObjects nsolid: add support for start/stopTrackingHeapObjects Feb 5, 2024
Copy link
Member

@trevnorris trevnorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff Juan. I just have one question, and one minor adjustment. Linter also fails on the test. Mind taking care of those and I'll approve.

src/nsolid/nsolid_heap_snapshot.cc Show resolved Hide resolved
test/addons/nsolid-track-heap-objects/binding.cc Outdated Show resolved Hide resolved
trevnorris pushed a commit that referenced this pull request Feb 20, 2024
This patch implements triggers for `startTrackingHeapObjects`
and `stopTrackingHeapObjects` in the heap profiler.

The implementation is based on what the inspector does:

The `startTrackingHeapObjects` will simply activate that in the
HeapProfiler and; the `stopTrackingHeapObjects` will create a heap
snapshot and deactivate the `TrackingHeapObjects` in the Heap
profiler.

This patch also includes the `trackAllocations` option supported.

PR-URL: #48
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Co-authored-by: Santiago Gimeno <santiago.gimeno@gmail.com>
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
trevnorris pushed a commit that referenced this pull request Feb 20, 2024
This patch implements triggers for `startTrackingHeapObjects`
and `stopTrackingHeapObjects` in the heap profiler.

The implementation is based on what the inspector does:

The `startTrackingHeapObjects` will simply activate that in the
HeapProfiler and; the `stopTrackingHeapObjects` will create a heap
snapshot and deactivate the `TrackingHeapObjects` in the Heap
profiler.

This patch also includes the `trackAllocations` option supported.

PR-URL: #48
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Co-authored-by: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
This patch implements triggers for `startTrackingHeapObjects`
and `stopTrackingHeapObjects` in the heap profiler.

The implementation is based on what the inspector does:

The `startTrackingHeapObjects` will simply activate that in the
HeapProfiler and; the `stopTrackingHeapObjects` will create a heap
snapshot and deactivate the `TrackingHeapObjects` in the Heap
profiler.

This patch also includes the `trackAllocations` option supported.

PR-URL: #48
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Co-authored-by: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.com>
@trevnorris trevnorris merged commit f7b4b61 into node-v20.x-nsolid-v5.x Feb 22, 2024
13 of 17 checks passed
@trevnorris trevnorris deleted the juan/track-heap-objects branch February 22, 2024 19:56
trevnorris pushed a commit that referenced this pull request Feb 28, 2024
This patch implements triggers for `startTrackingHeapObjects`
and `stopTrackingHeapObjects` in the heap profiler.

The implementation is based on what the inspector does:

The `startTrackingHeapObjects` will simply activate that in the
HeapProfiler and; the `stopTrackingHeapObjects` will create a heap
snapshot and deactivate the `TrackingHeapObjects` in the Heap
profiler.

This patch also includes the `trackAllocations` option supported.

PR-URL: #48
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Co-authored-by: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants