GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add --track-heap-objects by bmeck · Pull Request #2135 · nodejs/node

Conversation

@bmeck

@bmeck bmeck commented Jul 8, 2015

Copy link
Copy Markdown
Member

Right now we do not have a way to start iojs with heap object tracking.

Calling v8::Profiler::StartTrackingHeapObjects after node has started up will not include the reference info for objects in node core. This can be seen by running node-heapdump with the flag turned on. This information is useful for debugging tools and would be visible in Chrome DevTools in the same way that "Record heap allocation stack traces" functions from the DevTools settings pane.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Fishrock123 Fishrock123 added c++ Issues and PRs that require attention from people who are familiar with C++. v8 engine Issues and PRs related to the V8 dependency. labels Jul 8, 2015
@ofrobots

ofrobots commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

Does doc/iojs.1 also need to be modified?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thefourtheye

thefourtheye commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

I am not able to understand why we need the whitespace changes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck

bmeck commented Jul 8, 2015

Copy link
Copy Markdown
Member Author

@thefourtheye it was to keep 2 spaces between the switch and the description and keeping all of the descriptions aligned

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck

bmeck commented Jul 8, 2015

Copy link
Copy Markdown
Member Author

@ofrobots i can but I saw that --trace-sync-io was not in there either

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thefourtheye

thefourtheye commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

@bmeck Ah, I see what you are saying now. " --track-heap-objects track heap object allocations for heap snapshots\n", correct? Not a v8 expert, but the changes look straight-forward.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck

bmeck commented Jul 8, 2015

Copy link
Copy Markdown
Member Author

@thefourtheye correct

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

thefourtheye
thefourtheye reviewed Jul 8, 2015
View reviewed changes
Comment thread src/node.cc Outdated

@thefourtheye thefourtheye Jul 8, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Shouldn't we explicitly set this to False, in the else part?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bmeck bmeck Jul 8, 2015

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

none of the other switches work that way

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@thefourtheye thefourtheye Jul 8, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bnoordhuis bnoordhuis Jul 8, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Does it even need to be exposed to JS land?

(I guess the same question applies to .traceSyncIO, /cc @trevnorris.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@trevnorris trevnorris Jul 9, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yup. You're right. I can't think of a useful case to expose either of them to JS.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bnoordhuis bnoordhuis Jul 9, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good to know. @bmeck Can you remove the .trackHeapObjects property (and .traceSyncIO in a separate commit if you want)?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bmeck

bmeck commented Jul 9, 2015

Copy link
Copy Markdown
Member Author

@bnoordhuis removed trackHeapObjects from process, separate PR for traceSyncIO #2143

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Jul 9, 2015

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trevnorris

trevnorris commented Jul 9, 2015

Copy link
Copy Markdown
Contributor

@bmeck Not adding that extra documentation was a failure on my part. If all other options are listed then this and the other should as well.

EDIT: comment was meant for @ofrobots

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trevnorris

trevnorris commented Jul 9, 2015

Copy link
Copy Markdown
Contributor

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck
bmeck force-pushed the track-heap-objects branch from 3fb4779 to eaa89b7 Compare July 9, 2015 16:24
@thefourtheye

thefourtheye commented Jul 9, 2015

Copy link
Copy Markdown
Contributor

Do we need a test for this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck

bmeck commented Jul 9, 2015

Copy link
Copy Markdown
Member Author

@thefourtheye node itself does not include a way to dump heap snapshots, we could write one up but it would be akin to including node-heapdump in core.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bmeck added 3 commits July 10, 2015 16:06
@bmeck
add --track-heap-objects
9748d60
- This makes v8 add .trace_function_info to the serialized form of
  snapshots from v8::HeapSnapshot::Serialize
- .trace_funciton_info combined with .trace_node in snapshots tells the
  JS location that allocated a specific object
@bmeck
style changes, move tracking to earlier start
8e2490c
@bmeck
-h space between heapsnapshot
bd77a59
@bmeck
bmeck force-pushed the track-heap-objects branch from eaa89b7 to bd77a59 Compare July 10, 2015 21:24
trevnorris pushed a commit that referenced this pull request Jul 10, 2015
@bmeck @trevnorris
src: add --track-heap-objects
cf14a24
- This makes v8 add .trace_function_info to the serialized form of
  snapshots from v8::HeapSnapshot::Serialize
- .trace_funciton_info combined with .trace_node in snapshots tells the
  JS location that allocated a specific object

PR-URL: #2135
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
@trevnorris

trevnorris commented Jul 10, 2015

Copy link
Copy Markdown
Contributor

Squashed and landed in cf14a24.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trevnorris trevnorris closed this Jul 10, 2015
@Fishrock123 Fishrock123 added the semver-minor PRs that contain new features and should be released in the next minor version. label Jul 12, 2015
@Fishrock123

Fishrock123 commented Jul 12, 2015

Copy link
Copy Markdown
Contributor

Tagged as semver-minor, 2.4.0 ho! :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123 Fishrock123 mentioned this pull request Jul 16, 2015
Release Proposal: v2.4.0 #2189
Merged
Fishrock123 added a commit to Fishrock123/node that referenced this pull request Jul 17, 2015
@Fishrock123
2015-07-17 io.js v2.4.0 Release
a179bcb
Notable changes

* src: Added a new `--track-heap-objects` flag to track heap object
allocations for heap snapshots (Bradley Meck)
nodejs#2135.
* readline: Fixed a freeze that affected the repl if the keypress event
handler threw (Alex Kocharin) nodejs#2107.
* npm: Upgraded to v2.13.0, release notes can be found in
https://github.com/npm/npm/releases/tag/v2.13.0 (Forrest L Norvell)
nodejs#2152.

PR-URL: nodejs#2189
@snyk-bot snyk-bot mentioned this pull request Apr 1, 2020
[Snyk] Upgrade prismjs from 1.17.1 to 1.19.0 O330oei/node#14
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. semver-minor PRs that contain new features and should be released in the next minor version. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@bmeck @ofrobots @thefourtheye @bnoordhuis @trevnorris @Fishrock123
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.