-
Notifications
You must be signed in to change notification settings - Fork 35
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
Incorrect source file names in time profiles in Node 8 #89
Comments
I'm less certain that this is a problem with serialization.
The function 'fill' is listed as having server.js as the file it is in. |
Ran with Node 6, saw this in the profile before serialization:
|
Buffer seems to have the correct source file with node 8, though, and the wrong source file with node 6. With node 6:
With Node 8:
|
Yes, I am talking about that section of the flame chart. So basically, both node 6 and node 8 seem to have problems with the filenames in the profiles, but the problems are different. |
I wonder if this happen to depend on how the inlining works.
…On Tue, Dec 12, 2017 at 8:38 AM, Margaret Nolan ***@***.***> wrote:
Yes, I am talking about that section of the flame chart.
In node 6, the filename for fill is Buffer.js, and the filename for Buffer
is /path/to/server.js.
In node 8, the filename for fill is path/to/server.js, and the filename
for Buffer is Buffer.js.
So basically, both node 6 and node 8 seem to have problems with the
filenames in the profiles, but the problems are different.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABctwKxbuD1WCXCh05cHKeHwEC-H3Qeqks5s_qwPgaJpZM4Q70jY>
.
--
Alex
|
If you're essentially using |
This uses the CPU Profiler (cpu-profiler.h) which is based on timer based statistical sampling. I think that's what prof does as well. I think https://crbug.com/v8/6239 is supposed to be the tracking bug for this issue in V8. |
That tracking bug was about something else. I created v8:7203 for this specifically now. |
As a workaround on the profiler side I guess we could pretend the source file is empty when the line number is zero. But I'd rather prefer the profiler do that for us (or put the right source file name). |
@hashseed -- we'd mentioned this problem earlier. |
@nolanmar511 Yes. We'll be working on supporting that as well. |
@nolanmar511 @bmeurer @hashseed Who should own this issue? |
@fhinkel do you want to take a look? |
Yes, I'll check |
Is there an easy way to run this locally? I don't have auth credentials for GCP. Using the Edit: The recorded profile changes once I kill the Node process: and a bunch of file attributions change to Gist, just run |
@nolanmar Can you give instructions on running locally?
|
@fhinkel -- PR #95 will make it so that profiles are written out when starting the profile with To see profiles before they are serialized, you can add |
Here's my V8 patch that fixes the wrong file attribution for the cloud profiler and DevTools. We can probably backport it to Node master (and later to 8) after a few days of Canary coverage. |
Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I7a7524ad68a295efd35ef94295cd48f823376e07 Reviewed-on: https://chromium-review.googlesource.com/845624 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#50324}
This reverts commit c500aa9. Reason for revert: Breaks V8 Linux64 - gyp Original change's description: > [cpu-profiler] Fix script name when recording inlining info > > Use the script name from the shared function info to create an > inline entry. Otherwise functions are attributed to the wrong file > in the CpuProfileNode. > > See googleapis/cloud-profiler-nodejs#89 > > > Bug: v8:7203, v8:7241 > Change-Id: I7a7524ad68a295efd35ef94295cd48f823376e07 > Reviewed-on: https://chromium-review.googlesource.com/845624 > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> > Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> > Cr-Commit-Position: refs/heads/master@{#50324} TBR=jarin@chromium.org,franzih@chromium.org Change-Id: I5876d24723bb6bd20854db91a579485b07313a69 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:7203, v8:7241 Reviewed-on: https://chromium-review.googlesource.com/846771 Reviewed-by: Franziska Hinkelmann <franzih@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#50325}
Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#50339}
@nolanmar511 assigned to you for the verification. |
Merged to 6.4, should get picked up in this PR and land in Node master on January 23rd. |
Opened back port PR for current version of V8 in Node: nodejs/node#18298. Even if 6.4 gets merged before my PR, this is needed in older versions of node. |
This fixes a bug in the CPU profiler where some ticks were attributed to the wrong file. Original commit message: [cpu-profiler] Fix script name when recording inlining info Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{nodejs#50339} Refs: v8/v8@76c3ac5 PR-URL: nodejs#18298 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@nolanmar511 Please verify that this is fixed and close issue if so. |
This fixes a bug in the CPU profiler where some ticks were attributed to the wrong file. Original commit message: [cpu-profiler] Fix script name when recording inlining info Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#50339} Refs: v8/v8@76c3ac5 PR-URL: #18298 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This fixes a bug in the CPU profiler where some ticks were attributed to the wrong file. Original commit message: [cpu-profiler] Fix script name when recording inlining info Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#50339} Refs: v8/v8@76c3ac5 PR-URL: #18298 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This fixes a bug in the CPU profiler where some ticks were attributed to the wrong file. Original commit message: [cpu-profiler] Fix script name when recording inlining info Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#50339} Refs: v8/v8@76c3ac5 PR-URL: #18298 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This fixes a bug in the CPU profiler where some ticks were attributed to the wrong file. Original commit message: [cpu-profiler] Fix script name when recording inlining info Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{#50339} Refs: v8/v8@76c3ac5 PR-URL: #18298 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This fixes a bug in the CPU profiler where some ticks were attributed to the wrong file. Original commit message: [cpu-profiler] Fix script name when recording inlining info Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See googleapis/cloud-profiler-nodejs#89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Franziska Hinkelmann <franzih@chromium.org> Cr-Commit-Position: refs/heads/master@{nodejs#50339} Refs: v8/v8@76c3ac5 PR-URL: nodejs#18298 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
For the sample application, a time profile indicated that the function 'fill' was located within the source file below, when it should be marked as within 'buffer.js'. This is likely a problem with serialization, and since much of the serialization code is shared, heap profiles may also be impacted.
The text was updated successfully, but these errors were encountered: