New issue
Advanced search Search tips

Issue 708958 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

CPU profile flame chart don't draw the max depth stack last frame

Reported by muzui...@gmail.com, Apr 6 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Steps to reproduce the problem:
1. open url "chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true"

2. Switch to "Profile" Tab

3. Load a test.cpuprofile file

What is the expected behavior?
The flame chart should draw all the sample frame, chekcout excepted.png

What went wrong?
The max depth stack in the .cpuprofile file, the last frame doesn't draw in the main-view. checkout problem.png

Take a look the thumb-view, the second sample column is a bit higher than the first, but main-view draw as same height. There should be a "f6" frame in the second sample column.

Did this work before? N/A 

Chrome version: 58.0.3029.41  Channel: beta
OS Version: 4.10.8
Flash Version: 24.0.0.189

The test.cpuprofile is minimum data to reproduce the problem.

If a sample column is the max depth in all sample columns, and if it depth is bigger than 5, it's last frame won't be draw in main-view.

After hacking the devtools source code, I found how to workaround this.

The "5" constant variable is define here

https://chromium.googlesource.com/chromium/src/+/58.0.3029.41/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js#352

So, if stack depth is less than 5, don't have this problem.

After change the line in

https://chromium.googlesource.com/chromium/src/+/58.0.3029.41/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js#390

to "this._maxStackDepth = maxDepth + 1;", work as excepted.

That's because I found out "HeapProfile" has similar code, But it has "+1" for maxDepth variable.

https://chromium.googlesource.com/chromium/src/+/58.0.3029.41/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js#370
 

Comment 1 Deleted

Comment 2 by muzui...@gmail.com, Apr 6 2017

forgot to upload attachments.
test.cpuprofile
2.5 KB Download
problem.png
20.7 KB View Download
excepted.png
22.6 KB View Download
Labels: Needs-Triage-M58
Owner: caseq@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 5 by caseq@chromium.org, Apr 7 2017

Owner: alph@chromium.org

Comment 6 by alph@chromium.org, Apr 7 2017

Thanks for such a detailed evaluation!
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7292cee9d31336f2ac2f23205a52522177518fda

commit 7292cee9d31336f2ac2f23205a52522177518fda
Author: alph <alph@chromium.org>
Date: Fri Apr 07 05:58:01 2017

DevTools: do not clip CPU profile overview when stack depth > 5

BUG= 708958 

Review-Url: https://codereview.chromium.org/2796303008
Cr-Commit-Position: refs/heads/master@{#462785}

[modify] https://crrev.com/7292cee9d31336f2ac2f23205a52522177518fda/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js

Can we tag this ad fixed?

Comment 9 by alph@chromium.org, May 18 2017

Status: Fixed (was: Assigned)

Sign in to add a comment