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

deps: cherry-pick 6ee8345 from upstream V8 #22106

Closed
wants to merge 2 commits into from

Conversation

joyeecheung
Copy link
Member

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: https://github.com/nodejs/node/pull/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

cc @addaleax

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. v8 engine Issues and PRs related to the V8 dependency. labels Aug 3, 2018
@joyeecheung
Copy link
Member Author

@targos
Copy link
Member

targos commented Aug 3, 2018

Why don't land on v10?

@joyeecheung
Copy link
Member Author

@targos Because this is ABI-breaking.

This patch needs additional tweaking in src/heap_utils.cc to compile, I'm working on a fix

@joyeecheung
Copy link
Member Author

@joyeecheung
Copy link
Member Author

CI is green. Can you take a look at the new commit? Thanks! @addaleax

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@joyeecheung
Copy link
Member Author

Uh, wait, I was working on naming edges on top of this PR and noticed that there was a bug in test/common/heap.js so the graph has not been actually validated (if (expectedNode.edges) should've been if (expectedNode.children)), which hide another bug in this PR (edge_info had not been pushed to the edges array - the entries were still the edge targets)

I've fixed the bugs, PTAL, thanks! @addaleax @jasnell

CI: https://ci.nodejs.org/job/node-test-pull-request/16185/

@joyeecheung
Copy link
Member Author

Ping @addaleax @jasnell Can you take a look at the last commit? Thanks!

@joyeecheung
Copy link
Member Author

Ping again: @addaleax @jasnell

@joyeecheung
Copy link
Member Author

@joyeecheung
Copy link
Member Author

@joyeecheung
Copy link
Member Author

@joyeecheung
Copy link
Member Author

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
The signature of EmbedderGraph::AddEdge() has been changed so
the current implementation of JSGraph no longer compiles.
This patch updates the implementation accordingly.
@joyeecheung
Copy link
Member Author

@joyeecheung
Copy link
Member Author

One unrelated failure. Resume build: https://ci.nodejs.org/job/node-test-pull-request/16522/

Failures in job https://ci.nodejs.org/job/node-test-pull-request/16517/

rhel72-s390x

See failures on test-linuxonecc-rhel72-s390x-3:
not ok 1957 parallel/test-trace-events-fs-sync
  ---
  duration_ms: 2.641
  severity: fail
  exitcode: 1
  stack: |-
    assert.js:84
      throw new AssertionError(obj);
      ^
    
    AssertionError [ERR_ASSERTION]: fs.sync.open:
    { status: null,
      signal: 'SIGSEGV',
      output: [ null, '', '' ],
      pid: 29496,
      stdout: '',
      stderr: '' }
        at Object.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-trace-events-fs-sync.js:139:10)
        at Module._compile (internal/modules/cjs/loader.js:689:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
        at Module.load (internal/modules/cjs/loader.js:599:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
        at Function.Module._load (internal/modules/cjs/loader.js:530:3)
        at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
        at startup (internal/bootstrap/node.js:257:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:628:3)
  ...

@joyeecheung
Copy link
Member Author

CI is green

joyeecheung added a commit that referenced this pull request Aug 18, 2018
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 added a commit that referenced this pull request Aug 18, 2018
The signature of EmbedderGraph::AddEdge() has been changed so
the current implementation of JSGraph no longer compiles.
This patch updates the implementation accordingly.

PR-URL: #22106
Refs: v8/v8@6ee8345
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos added a commit to targos/node that referenced this pull request Aug 28, 2018
To avoid conflicts while cherry-picking future V8 backports, increment
the embedder string by one so it has the same value as in the master
branch. The value was off by one because of an ABI-breaking backport
that could not be taken in v10.x.

Refs: nodejs#22106
targos added a commit that referenced this pull request Aug 30, 2018
To avoid conflicts while cherry-picking future V8 backports, increment
the embedder string by one so it has the same value as in the master
branch. The value was off by one because of an ABI-breaking backport
that could not be taken in v10.x.

Refs: #22106

PR-URL: #22573
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
targos added a commit that referenced this pull request Sep 3, 2018
To avoid conflicts while cherry-picking future V8 backports, increment
the embedder string by one so it has the same value as in the master
branch. The value was off by one because of an ABI-breaking backport
that could not be taken in v10.x.

Refs: #22106

PR-URL: #22573
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
targos added a commit that referenced this pull request Sep 6, 2018
To avoid conflicts while cherry-picking future V8 backports, increment
the embedder string by one so it has the same value as in the master
branch. The value was off by one because of an ABI-breaking backport
that could not be taken in v10.x.

Refs: #22106

PR-URL: #22573
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
joyeecheung added a commit to joyeecheung/node that referenced this pull request Oct 5, 2018
The signature of EmbedderGraph::AddEdge() has been changed so
the current implementation of JSGraph no longer compiles.
This patch updates the implementation accordingly.

PR-URL: nodejs#22106
Refs: v8/v8@6ee8345
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Oct 7, 2018
The signature of EmbedderGraph::AddEdge() has been changed so
the current implementation of JSGraph no longer compiles.
This patch updates the implementation accordingly.

Backport-PR-URL: #23295
PR-URL: #22106
Refs: v8/v8@6ee8345
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Oct 7, 2018
The signature of EmbedderGraph::AddEdge() has been changed so
the current implementation of JSGraph no longer compiles.
This patch updates the implementation accordingly.

Backport-PR-URL: #23295
PR-URL: #22106
Refs: v8/v8@6ee8345
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants