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

Reland workaround for perf-basic-prof filename truncation issue #3520

Closed
wants to merge 1 commit into from

Conversation

ofrobots
Copy link
Contributor

This is a proposed reland of #3165 onto v4.x (EDIT: and v5.x and master). The patch abates
the truncation of script filenames in the perf-event output produced by V8. This greatly improves ability to work with perf profiles. This would be very useful to have in v4.x.

V8 commits:
Original: v8/v8@03ef3cd
Reland: v8/v8@010897c

R=@bnoordhuis, @nodejs/lts

Original commit message:
improve perf_basic_prof filename reporting

The buffer used for appending filenames to the string printed to the
perf_basic_prof log was unnecessarily too small. Bump it up to be at least
kUtf8BufferSize.

Truncation of filenames makes it really hard to work with profiles gathered on
Node.js. Because of the way Node.js works, you can have node module dependencies
in deeply nested directories. The last thing you want when investigating a
performance problem is to have script names be truncated.

This patch is a stop-gap. Ideally, I want no truncation of the filename at all
and use a dynamically growing buffer. That would be a larger change, and I
wanted to have a quick fix available that can be back-ported to Node.js LTS
release.

R=yangguo@chromium.org,yurys@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1388543002

This is a reland of nodejs#3165. The patch abates
the truncation of script filenames in the perf-event output produced by V8.

V8 commits:
Original: v8/v8@03ef3cd
Reland: v8/v8@010897c

Original commit message:
  improve perf_basic_prof filename reporting

  The buffer used for appending filenames to the string printed to the
  perf_basic_prof log was unnecessarily too small. Bump it up to be at least
  kUtf8BufferSize.

  Truncation of filenames makes it really hard to work with profiles gathered on
  Node.js. Because of the way Node.js works, you can have node module dependencies
  in deeply nested directories. The last thing you want when investigating a
  performance problem is to have script names be truncated.

  This patch is a stop-gap. Ideally, I want no truncation of the filename at all
  and use a dynamically growing buffer. That would be a larger change, and I
  wanted to have a quick fix available that can be back-ported to Node.js LTS
  release.

  R=yangguo@chromium.org,yurys@chromium.org
  BUG=

  Review URL: https://codereview.chromium.org/1388543002
@mscdex mscdex added the v8 engine Issues and PRs related to the V8 dependency. label Oct 26, 2015
@bnoordhuis
Copy link
Member

LGTM

@jasnell
Copy link
Member

jasnell commented Oct 26, 2015

@ofrobots ... can you please retarget this to land in v4.x-staging. We're trying to avoid landing commits directly into v4.x until it's time to actually cut a new LTS release. /cc @nodejs/lts

@ofrobots
Copy link
Contributor Author

@ofrobots
Copy link
Contributor Author

The fix was upstream merged into V8-4.7 only: https://code.google.com/p/v8/issues/detail?id=4517. This means this needs to land onto master (V8-4.6) as well. I am going to retarget this PR to land on master, and I will let @jasnell cherry-pick to v4.x-staging and v4.x.

CI for master: https://ci.nodejs.org/job/node-test-pull-request/635

@ofrobots
Copy link
Contributor Author

CI against master, launched properly this time: https://ci.nodejs.org/job/node-test-commit/1003/

ofrobots added a commit that referenced this pull request Oct 28, 2015
This is a reland of #3165. The patch abates
the truncation of script filenames in the perf-event output produced by V8.

V8 commits:
Original: v8/v8@03ef3cd
Reland: v8/v8@010897c

Original commit message:
  improve perf_basic_prof filename reporting

  The buffer used for appending filenames to the string printed to the
  perf_basic_prof log was unnecessarily too small. Bump it up to be at least
  kUtf8BufferSize.

  Truncation of filenames makes it really hard to work with profiles gathered on
  Node.js. Because of the way Node.js works, you can have node module dependencies
  in deeply nested directories. The last thing you want when investigating a
  performance problem is to have script names be truncated.

  This patch is a stop-gap. Ideally, I want no truncation of the filename at all
  and use a dynamically growing buffer. That would be a larger change, and I
  wanted to have a quick fix available that can be back-ported to Node.js LTS
  release.

  R=yangguo@chromium.org,yurys@chromium.org
  BUG=

  Review URL: https://codereview.chromium.org/1388543002

PR-URL: #3520
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
@ofrobots
Copy link
Contributor Author

Landed in 81f6b54 on master. @jasnell, @rvagg This can be cherry-picked over to v4.x and v5.x.

ofrobots added a commit that referenced this pull request Oct 28, 2015
This is a reland of #3165. The patch abates
the truncation of script filenames in the perf-event output produced by V8.

V8 commits:
Original: v8/v8@03ef3cd
Reland: v8/v8@010897c

Original commit message:
  improve perf_basic_prof filename reporting

  The buffer used for appending filenames to the string printed to the
  perf_basic_prof log was unnecessarily too small. Bump it up to be at least
  kUtf8BufferSize.

  Truncation of filenames makes it really hard to work with profiles gathered on
  Node.js. Because of the way Node.js works, you can have node module dependencies
  in deeply nested directories. The last thing you want when investigating a
  performance problem is to have script names be truncated.

  This patch is a stop-gap. Ideally, I want no truncation of the filename at all
  and use a dynamically growing buffer. That would be a larger change, and I
  wanted to have a quick fix available that can be back-ported to Node.js LTS
  release.

  R=yangguo@chromium.org,yurys@chromium.org
  BUG=

  Review URL: https://codereview.chromium.org/1388543002

PR-URL: #3520
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
@jasnell
Copy link
Member

jasnell commented Oct 28, 2015

Landed in v4.x-staging in 77511eb

@targos targos closed this Oct 28, 2015
rvagg pushed a commit to rvagg/io.js that referenced this pull request Oct 29, 2015
This is a reland of nodejs#3165. The patch abates
the truncation of script filenames in the perf-event output produced by V8.

V8 commits:
Original: v8/v8@03ef3cd
Reland: v8/v8@010897c

Original commit message:
  improve perf_basic_prof filename reporting

  The buffer used for appending filenames to the string printed to the
  perf_basic_prof log was unnecessarily too small. Bump it up to be at least
  kUtf8BufferSize.

  Truncation of filenames makes it really hard to work with profiles gathered on
  Node.js. Because of the way Node.js works, you can have node module dependencies
  in deeply nested directories. The last thing you want when investigating a
  performance problem is to have script names be truncated.

  This patch is a stop-gap. Ideally, I want no truncation of the filename at all
  and use a dynamically growing buffer. That would be a larger change, and I
  wanted to have a quick fix available that can be back-ported to Node.js LTS
  release.

  R=yangguo@chromium.org,yurys@chromium.org
  BUG=

  Review URL: https://codereview.chromium.org/1388543002

PR-URL: nodejs#3520
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
@rvagg rvagg mentioned this pull request Oct 29, 2015
ofrobots added a commit that referenced this pull request Oct 29, 2015
This is a reland of #3165. The patch abates
the truncation of script filenames in the perf-event output produced by V8.

V8 commits:
Original: v8/v8@03ef3cd
Reland: v8/v8@010897c

Original commit message:
  improve perf_basic_prof filename reporting

  The buffer used for appending filenames to the string printed to the
  perf_basic_prof log was unnecessarily too small. Bump it up to be at least
  kUtf8BufferSize.

  Truncation of filenames makes it really hard to work with profiles gathered on
  Node.js. Because of the way Node.js works, you can have node module dependencies
  in deeply nested directories. The last thing you want when investigating a
  performance problem is to have script names be truncated.

  This patch is a stop-gap. Ideally, I want no truncation of the filename at all
  and use a dynamically growing buffer. That would be a larger change, and I
  wanted to have a quick fix available that can be back-ported to Node.js LTS
  release.

  R=yangguo@chromium.org,yurys@chromium.org
  BUG=

  Review URL: https://codereview.chromium.org/1388543002

PR-URL: #3520
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
@ofrobots ofrobots deleted the perf-filename-truncation branch November 5, 2015 19:23
@bnoordhuis
Copy link
Member

Landed in v4.x-staging in 77511eb

It looks like the actual commit is a6469e9; 77511eb appears to be an orphan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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