Summary: | Web Inspector: implement Flame Chart for CPU profiler | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ilya Tikhonovsky <loislo> | ||||||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Ilya Tikhonovsky <loislo> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, yurys | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
Attachments: |
|
Description
Ilya Tikhonovsky
2013-03-01 04:33:26 PST
Created attachment 190933 [details]
screenshot
Created attachment 190934 [details]
Patch
Created attachment 190938 [details]
Patch
Comment on attachment 190938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=190938&action=review > Source/WebCore/inspector/front-end/CPUProfileView.js:65 > + } else { style: no braces for one-line block. > Source/WebCore/inspector/front-end/CPUProfileView.js:101 > +WebInspector.FlameChart = function(cpuProfileView) Why not move it into its own file? > Source/WebCore/inspector/front-end/CPUProfileView.js:107 > + this._canvas = document.createElement("canvas"); this._canvas = this.element.createChild("canvas"); > Source/WebCore/inspector/front-end/CPUProfileView.js:183 > + draw: function(height, width) It is usually width, heigh (in reverse order). > Source/WebCore/inspector/front-end/CPUProfileView.js:194 > + this._color = initialColor; Consider using WebInspector.Color > Source/WebCore/inspector/front-end/CPUProfileView.js:211 > + _forEach: function(callback) Please rename _forEach -> _forEachNode > Source/WebCore/inspector/front-end/CPUProfileView.js:227 > + nodes = nodes.concat(node.children); This way the nodes will appear in reverse order, won't they? > Source/WebCore/inspector/front-end/CPUProfileView.js:241 > + * @param {!ProfilerAgent.CPUProfileNode} node color annotation is missing, also I'd rename it to rgbColor > Source/WebCore/inspector/front-end/CPUProfileView.js:900 > + Revert this? > Source/WebCore/inspector/front-end/CPUProfileView.js:934 > +//@ sourceURL=http://localhost/inspector/front-end/CPUProfileView.js Remove this. Created attachment 191199 [details]
Patch
Comment on attachment 190938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=190938&action=review >> Source/WebCore/inspector/front-end/CPUProfileView.js:194 >> + this._color = initialColor; > > Consider using WebInspector.Color done >> Source/WebCore/inspector/front-end/CPUProfileView.js:211 >> + _forEach: function(callback) > > Please rename _forEach -> _forEachNode done >> Source/WebCore/inspector/front-end/CPUProfileView.js:227 >> + nodes = nodes.concat(node.children); > > This way the nodes will appear in reverse order, won't they? It is not a problem because children have no order. >> Source/WebCore/inspector/front-end/CPUProfileView.js:241 >> + * @param {!ProfilerAgent.CPUProfileNode} node > > color annotation is missing, also I'd rename it to rgbColor done: hslColor >> Source/WebCore/inspector/front-end/CPUProfileView.js:900 >> + > > Revert this? done >> Source/WebCore/inspector/front-end/CPUProfileView.js:934 >> +//@ sourceURL=http://localhost/inspector/front-end/CPUProfileView.js > > Remove this. done Created attachment 191200 [details]
Patch
Committed r144618: <http://trac.webkit.org/changeset/144618> |