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 — src: use V8 graph heap snapshot API by addaleax · Pull Request #21741 · nodejs/node

Conversation

@addaleax

@addaleax addaleax commented Jul 10, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Addresses a pending V8 deprecation and generally makes our heap snapshot memory reporting much more accurate. I’ll cherry-pick the first commit into its own PR (edit: #21742). Also, since this is somewhat large-ish, I’d recommend per-commit reviewing :)

  • src: enable more detailed memory tracking

    This will enable more detailed heap snapshots based on
    a newer V8 API.

    This commit itself is not tied to that API and could
    be backported.

  • src: add iteration over all base objects to Environment

  • Cherry-pick v8/v8@555c811

  • src: use V8 graph heap snapshot API

    Transition to a newer, more flexible API for
    heap snapshot creation.

    This addresses a currently pending deprecation in the V8 API.

    Fixes: Introduce BuildEmbedderGraphCallback #21633

  • src: make heap snapshot & embedder graph accessible for tests

    Add methods that allow inspection of heap snapshots and a JS
    version of our own embedder graph.

    These can be used in tests and might also prove useful for
    ad-hoc debugging. Usage requires --expose-internals and
    prints a warning similar to our other modules whose primary
    purpose is test support.

  • test: add heap snapshot tests

    Add a number of tests that validate that heap snapshots
    contain what we expect them to contain, and cross-check
    against a JS version of our own embedder graphs.

/cc @targos @joyeecheung @danbev @nodejs/diagnostics (and maybe @Trott as somebody to look at the last commit?)

Sorry, something went wrong.

Uh oh!

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

joyeecheung, TimothyGu, and BridgeAR reacted with hooray emoji
All reactions
  • 🎉 3 reactions
@addaleax addaleax 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. memory Issues and PRs related to Node.js memory management or memory footprint. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels Jul 10, 2018
@nodejs-github-bot

nodejs-github-bot commented Jul 10, 2018

Copy link
Copy Markdown
Collaborator

@addaleax build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/245/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs involving general changes in the lib/ or src/ directories. label Jul 10, 2018
@addaleax addaleax mentioned this pull request Jul 10, 2018
src: enable more detailed memory tracking #21742
Closed
2 tasks done
@addaleax addaleax added the dont-land-on-v8.x label Jul 10, 2018
@Trott

Trott commented Jul 10, 2018

Copy link
Copy Markdown
Member

@nodejs/testing on the b5e3c32 commit. LGTM from a quick scan. Will try to look a bit closer later but a review on that from @apapirovski, @BridgeAR, @cjihrig, or @refack might be better than a review from me.

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax

addaleax commented Jul 10, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Full CI: https://ci.nodejs.org/job/node-test-pull-request/15792/
CI: https://ci.nodejs.org/job/node-test-pull-request/15793/

All reactions

Sorry, something went wrong.

Uh oh!

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

jasnell
jasnell approved these changes Jul 10, 2018
View reviewed changes
@addaleax
addaleax force-pushed the heap branch from b5e3c32 to c197f31 Compare July 10, 2018 23:00
joyeecheung
joyeecheung reviewed Jul 11, 2018
View reviewed changes
Comment thread src/heap_utils.cc Outdated

@joyeecheung joyeecheung Jul 11, 2018

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.

This does not seem to have to be in src? Can we create a directory in test that specifically build this as an addon so we don't need to build it into the binary and use internalBinding to load it?

Sorry, something went wrong.

Uh oh!

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

All reactions

@addaleax addaleax Jul 11, 2018 •
edited
Loading

Uh oh!

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

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.

It does use Environment::BuildEmbedderGraph … would we want to expose that instead?

Edit: Also, I was kinda wondering whether buildEmbedderGraph() could be useful for ad-hoc debugging … even with it printing a warning, I think this might sometimes be useful for inspecting Node?

Sorry, something went wrong.

Uh oh!

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

All reactions

@joyeecheung joyeecheung Jul 12, 2018

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.

@addaleax It would be convenient to have helper methods to take a heap dump and get the subgraph of embedder nodes/edges, yes. (Hopefully no one in the user land would attempt to abuse them even with the warning..)

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread lib/internal/test/heap.js Outdated

@joyeecheung joyeecheung Jul 11, 2018

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.

name === 'name_or_index' seems more natural? This basically implies that item is an edge.

Sorry, something went wrong.

Uh oh!

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

All reactions

@addaleax addaleax Jul 11, 2018

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.

Done!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/cares_wrap.cc Outdated

@joyeecheung joyeecheung Jul 11, 2018 •
edited
Loading

Uh oh!

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

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.

Shouldn't these subclasses of MemoryRetainer override their MemoryInfoName() as well? If I am reading the code correctly, this prefers using the class names of the target nodes as edge names?

EDIT: the EmbedderGraph API doesn't seem to allow you to specify a name for the edge, even though the class HeapGraphEdge defined in v8-profiler.h has something like that

Sorry, something went wrong.

Uh oh!

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

All reactions

@addaleax addaleax Jul 11, 2018

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.

If I am reading the code correctly, this prefers using the class names of the target nodes as edge names?

Yes… I don’t think it makes much difference in this case, at least as long as we can’t name edges?

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/parallel/test-heapdump-fs-promise.js Outdated

@joyeecheung joyeecheung Jul 11, 2018

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.

If I am reading the code correctly...this means that there will be edges named with class names? Aren't those supposed to be something like property names? (e.g. something like fs_stats_field_array here)

Sorry, something went wrong.

Uh oh!

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

All reactions

@addaleax addaleax Jul 11, 2018

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.

As you edited above, we don’t currently have any ways to name the edges as embedders :/

Sorry, something went wrong.

Uh oh!

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

All reactions

@joyeecheung joyeecheung Jul 11, 2018 •
edited
Loading

Uh oh!

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

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.

@addaleax Yeah..I looked into the source a bit, looks like those edges all appear as element edges with auto-incremented indexes (which is kind of odd because then our nodes would appear somewhat like arrays, whereas other internal nodes in V8 usually have internal edges with more meaningful names), it's the validation here that use the target node names for inputs.

I opened a feature request in the upstream: https://bugs.chromium.org/p/v8/issues/detail?id=7938 but until it's sorted out it's still worth landing this with indexed edges IMO. It's better than our current integration anyway.

Sorry, something went wrong.

Uh oh!

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

addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@addaleax addaleax Jul 11, 2018

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.

but until it's sorted out it's still worth landing this with indexed edges IMO

@joyeecheung Can you explain, what does “indexed edges” mean here? i.e. how is it different from what this PR currently does? Or am I missing something? 😄

Sorry, something went wrong.

Uh oh!

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

All reactions

@joyeecheung joyeecheung Jul 11, 2018 •
edited
Loading

Uh oh!

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

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.

@addaleax The current EmbedderGraph API will create edges with type kElement and with indexes that are automatically incremented (based on the count of edges of the from node). The internal V8 edges, for example, the ones pointing to shared function info or context nodes from JS functions, have type kInternal and corresponding string names. That's why those references show up in the DevTools as gray and will have proper names displayed (otherwise you may see a function has a reference named with a number to a shared function info node, instead of a reference named shared, which is odd because you rarely see a function with a number-keyed property and you couldn't tell if it's added by you in the JS land).

Sorry, something went wrong.

Uh oh!

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

All reactions

@joyeecheung joyeecheung Jul 11, 2018 •
edited
Loading

Uh oh!

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

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.

@addaleax Yeah, if I understand correctly the snapshots generated with the current approach will show up with number indexed references from the embedder nodes to other nodes (e.g. it looks as if FSREQPROMISE[1] = Float64Array(...) instead of FSREQPROMISE.stats_field_array = Float64Array(...), the members will have their names overridden from Float64Array to stats_field_array), which would look a bit confusing but still it's better than no references tracked in the snapshots at all.

I opened https://chromium-review.googlesource.com/c/v8/v8/+/926362 BTW

Sorry, something went wrong.

Uh oh!

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

addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@addaleax addaleax Jul 11, 2018

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.

I opened https://chromium-review.googlesource.com/c/v8/v8/+/926362 BTW

@joyeecheung Tbh, I don’t really understand the semantics of NamePrefix either. :/

Sorry, something went wrong.

Uh oh!

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

All reactions

@joyeecheung joyeecheung Jul 11, 2018

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.

@addaleax Ooops, wrong link: https://chromium-review.googlesource.com/c/v8/v8/+/1133299

Sorry, something went wrong.

Uh oh!

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

All reactions

@joyeecheung joyeecheung Jul 11, 2018 •
edited
Loading

Uh oh!

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

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.

screen shot 2018-07-12 at 12 36 22 am

By the way this is what I meant by "indexed edges", which are also created by the deprecated RetainedObjectInfo. Making those numbers human-readable names would help users navigate in the DevTools.

Sorry, something went wrong.

Uh oh!

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

addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@addaleax addaleax Jul 11, 2018

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.

Okay, yeah, makes sense – not the end of the world but would definitely be very nice to have.

Sorry, something went wrong.

Uh oh!

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

All reactions
@addaleax
addaleax force-pushed the heap branch 2 times, most recently from 044d423 to 01f050d Compare July 11, 2018 16:24
@addaleax

addaleax commented Jul 12, 2018

Copy link
Copy Markdown
Member Author

@joyeecheung Should we wait for your CL to be merged, and then update this? I think that makes sense at this point?

All reactions

Sorry, something went wrong.

Uh oh!

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

joyeecheung
joyeecheung reviewed Jul 12, 2018
View reviewed changes
Comment thread test/common/heap.js Outdated

@joyeecheung joyeecheung Jul 12, 2018 •
edited
Loading

Uh oh!

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

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.

It's a bit confusing to name that expectedEdge.name since the name is actually from the target node and not the edge itself. Can we change the format of expected a bit to be clearer? I think referring to those as children and child would be enough?

Sorry, something went wrong.

Uh oh!

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

All reactions

@addaleax addaleax Jul 12, 2018

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.

Yup, sounds good. Done!

While addressing this, it occurred to me that expectedChild may or may not be a sensible variable name to use (because of the real-world usage of that term), but I’ll leave it that way until somebody has something better. :)

Sorry, something went wrong.

Uh oh!

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

joyeecheung reacted with laugh emoji
All reactions
  • 😄 1 reaction
@joyeecheung

joyeecheung commented Jul 12, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Should we wait for your CL to be merged, and then update this? I think that makes sense at this point?

@addaleax I don't think we need to wait until the CL is merged, since currently the snapshot generated from Node.js have indexed edges anyway and this is still an improvement since it tracks more stuff and gets rid of usage of a deprecated API. The naming of the edges can be left as a future exercise.

All reactions

Sorry, something went wrong.

Uh oh!

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

joyeecheung
joyeecheung reviewed Jul 12, 2018
View reviewed changes
Comment thread src/memory_tracker-inl.h Outdated

@joyeecheung joyeecheung Jul 12, 2018 •
edited
Loading

Uh oh!

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

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.

We may want to override NamePrefix() as well? Like using Node / so our nodes would appear with names Node / Zlib and they would be more distinguishable that way (the node names are more like class names instead of reference names). V8 tend to use system / as a prefix for internal nodes like contexts and Chromium sometimes use Window / (although they seem to be just prepending the prefixes manually instead of using this API).

Sorry, something went wrong.

Uh oh!

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

addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@addaleax addaleax Jul 12, 2018

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.

Sounds good to me, done! :)

Sorry, something went wrong.

Uh oh!

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

All reactions
@addaleax
addaleax force-pushed the heap branch from 01f050d to b767313 Compare July 12, 2018 12:14
@addaleax

addaleax commented Jul 12, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Should we wait for your CL to be merged, and then update this? I think that makes sense at this point?

@addaleax I don't think we need to wait until the CL is merged, since currently the snapshot generated from Node.js have indexed edges anyway and this is still an improvement since it tracks more stuff and gets rid of usage of a deprecated API. The naming of the edges can be left as a future exercise.

@joyeecheung I’m asking because we do need to adjust src/heap_utils.cc when your CL lands, and in particular V8 will have to update their copy of Node to account for it. It’s trivial to work around the method signature change, but, you know, might be easier that way? Otherwise I completely agree. :)

And in any case, thanks for working through this with me! 🙂

(Edit: Just remembering, your CL is ABI-breaking. We could ignore that but maybe we shouldn’t.)

All reactions

Sorry, something went wrong.

Uh oh!

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

kisg pushed a commit to paul99/v8mips that referenced this pull request Jul 12, 2018
@joyeecheung Commit Bot
[heap-profiler] Allow embedder to specify edge names
6ee8345
This patch adds a variant of EmbedderGraph::AddEdge() which
allows the embedder to specify the name of an edge. The edges
added without name are element edges with auto-incremented indexes
while the edges added with names will be internal edges with
the specified names for more meaningful output in the heap
snapshot.

Refs: nodejs/node#21741
Bug: v8:7938
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I8feefa2cf6911743e24b3b2024e0e849b0c65cd3
Reviewed-on: https://chromium-review.googlesource.com/1133299
Commit-Queue: Ulan Degenbaev <[email protected]>
Reviewed-by: Ulan Degenbaev <[email protected]>
Cr-Commit-Position: refs/heads/master@{#54412}
joyeecheung
joyeecheung approved these changes Jul 12, 2018
View reviewed changes

@joyeecheung joyeecheung left a comment

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.

LGTM with a nit. Thanks for working on this!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/common/README.md Outdated

@joyeecheung joyeecheung Jul 12, 2018

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.

This is now children

Sorry, something went wrong.

Uh oh!

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

All reactions

@addaleax addaleax Jul 13, 2018

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.

Thanks, done!

Sorry, something went wrong.

Uh oh!

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

All reactions
@joyeecheung

joyeecheung commented Jul 12, 2018

Copy link
Copy Markdown
Member

@addaleax Regarding the ABI breakage: I think if we want stay on the safe side, we'd better cherry-pick the CL and use the new signature in another PR and mark it as dont-land-on-v10.x? I couldn't think of a way to avoid the breakage given how EmbedderGraph::Node is designed :(

addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@addaleax
addaleax force-pushed the heap branch 2 times, most recently from 8a0cf5c to e354714 Compare July 13, 2018 13:00
refack
refack approved these changes Jul 13, 2018
View reviewed changes
Comment thread test/common/README.md Outdated

@refack refack Jul 13, 2018

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.

Could you add a comment that this requires --expose-internals

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/common/heap.js Outdated

@refack refack Jul 13, 2018

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.

Maybe add:

try {
  require.resolve('internal/test/heap');
} catch (e) {
  console.log("using `test/common/heap.js` requires `--expose-internals`");
  throw e;
}

Sorry, something went wrong.

Uh oh!

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

All reactions
@addaleax

addaleax commented Jul 13, 2018

Copy link
Copy Markdown
Member Author

@refack Thanks for the review, done in 175b272426a7b9e5fe228316adb0ade613aab997!

All reactions

Sorry, something went wrong.

Uh oh!

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

@refack

refack commented Jul 13, 2018

Copy link
Copy Markdown
Contributor

👍 seems like a very helpful tool.

Regarding the ABI breakage

Doesn't that necessitate semver-major?

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax

addaleax commented Jul 13, 2018

Copy link
Copy Markdown
Member Author

@refack The ABI breakage was referring to v8/v8@6ee8345, and we decided against including it for that reason :)

refack reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

This was referenced Jul 18, 2018
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#207
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#208
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#209
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#210
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#211
Closed
targos pushed a commit to targos/node that referenced this pull request Jul 25, 2018
@addaleax @targos
deps: cherry-pick 555c811 from upstream V8
f28be41
Original commit message:

    [api] Switch from `SetBuildEmbedderGraphCallback` to `AddBuildEmbedderGraphCallback`

    `SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
    assumes a monolithic embedder that can provide all necessary information.
    That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
    instances per V8 Isolate, as well as native addons that may allocate resources
    on their own.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
    Reviewed-on: https://chromium-review.googlesource.com/1082441
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#53545}

Refs: v8/v8@555c811

PR-URL: nodejs#21741
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Jul 26, 2018
@addaleax @targos
deps: cherry-pick 555c811 from upstream V8
aa58e2e
Original commit message:

    [api] Switch from `SetBuildEmbedderGraphCallback` to `AddBuildEmbedderGraphCallback`

    `SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
    assumes a monolithic embedder that can provide all necessary information.
    That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
    instances per V8 Isolate, as well as native addons that may allocate resources
    on their own.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
    Reviewed-on: https://chromium-review.googlesource.com/1082441
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#53545}

Refs: v8/v8@555c811

PR-URL: nodejs#21741
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Jul 26, 2018
@addaleax @targos
deps: cherry-pick 555c811 from upstream V8
9d70858
Original commit message:

    [api] Switch from `SetBuildEmbedderGraphCallback` to `AddBuildEmbedderGraphCallback`

    `SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
    assumes a monolithic embedder that can provide all necessary information.
    That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
    instances per V8 Isolate, as well as native addons that may allocate resources
    on their own.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
    Reviewed-on: https://chromium-review.googlesource.com/1082441
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#53545}

Refs: v8/v8@555c811

PR-URL: nodejs#21741
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 10, 2018
@addaleax @MylesBorins
deps: cherry-pick 555c811 from upstream V8
c712e8c
Original commit message:

    [api] Switch from `SetBuildEmbedderGraphCallback` to `AddBuildEmbedderGraphCallback`

    `SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
    assumes a monolithic embedder that can provide all necessary information.
    That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
    instances per V8 Isolate, as well as native addons that may allocate resources
    on their own.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
    Reviewed-on: https://chromium-review.googlesource.com/1082441
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#53545}

Refs: v8/v8@555c811

Backport-PR-URL: #21668
PR-URL: #21741
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
@rvagg rvagg mentioned this pull request Aug 13, 2018
Release proposal: v10.9.0 #22295
Merged
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#230
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#215
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#231
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#216
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#232
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#217
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#233
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#218
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#234
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#219
Closed
joyeecheung added a commit to joyeecheung/node that referenced this pull request Aug 17, 2018
@joyeecheung
deps: cherry-pick 6ee8345 from upstream V8
2949154
Original commit message:

    [heap-profiler] Allow embedder to specify edge names

    This patch adds a variant of EmbedderGraph::AddEdge() which
    allows the embedder to specify the name of an edge. The edges
    added without name are element edges with auto-incremented indexes
    while the edges added with names will be internal edges with
    the specified names for more meaningful output in the heap
    snapshot.

    Refs: nodejs#21741
    Bug: v8:7938
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I8feefa2cf6911743e24b3b2024e0e849b0c65cd3
    Reviewed-on: https://chromium-review.googlesource.com/1133299
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54412}

Refs: v8/v8@6ee8345
joyeecheung added a commit that referenced this pull request Aug 18, 2018
@joyeecheung
deps: cherry-pick 6ee8345 from upstream V8
54c87f3
Original commit message:

    [heap-profiler] Allow embedder to specify edge names

    This patch adds a variant of EmbedderGraph::AddEdge() which
    allows the embedder to specify the name of an edge. The edges
    added without name are element edges with auto-incremented indexes
    while the edges added with names will be internal edges with
    the specified names for more meaningful output in the heap
    snapshot.

    Refs: #21741
    Bug: v8:7938
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I8feefa2cf6911743e24b3b2024e0e849b0c65cd3
    Reviewed-on: https://chromium-review.googlesource.com/1133299
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#54412}

Refs: v8/v8@6ee8345

PR-URL: #22106
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@joyeecheung joyeecheung mentioned this pull request Sep 20, 2018
src: remove calls to SetWrapperClassId() #22975
Closed
2 tasks done
joyeecheung added a commit that referenced this pull request Sep 23, 2018
@joyeecheung
src: remove calls to SetWrapperClassId()
c67d3d0
We have migrated from the deprecated RetainedObjectInfo API to
the new EmbedderGraph API, so there is no need to take care
of wrapper class ids anymore since they are dedicated to the
deprecated API (the new API uses a graph instead of ids to retrieve
info about nodes).

PR-URL: #22975
Refs: #21741
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
targos pushed a commit that referenced this pull request Sep 24, 2018
@joyeecheung @targos
src: remove calls to SetWrapperClassId()
cb3062a
We have migrated from the deprecated RetainedObjectInfo API to
the new EmbedderGraph API, so there is no need to take care
of wrapper class ids anymore since they are dedicated to the
deprecated API (the new API uses a graph instead of ids to retrieve
info about nodes).

PR-URL: #22975
Refs: #21741
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
firass111 pushed a commit to firass111/Project_node1 that referenced this pull request Apr 16, 2025
@addaleax @rvagg
deps: cherry-pick 555c811 from upstream V8
4f24256
Original commit message:

    [api] Switch from `SetBuildEmbedderGraphCallback` to `AddBuildEmbedderGraphCallback`

    `SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
    assumes a monolithic embedder that can provide all necessary information.
    That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
    instances per V8 Isolate, as well as native addons that may allocate resources
    on their own.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
    Reviewed-on: https://chromium-review.googlesource.com/1082441
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#53545}

Refs: v8/v8@555c811

Backport-PR-URL: nodejs/node#21668
PR-URL: nodejs/node#21741
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@joyeecheung joyeecheung joyeecheung approved these changes
+1 more reviewer
@refack refack refack approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. memory Issues and PRs related to Node.js memory management or memory footprint. 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.

7 participants

@addaleax @nodejs-github-bot @Trott @joyeecheung @refack @targos @jasnell
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.