| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 */ | 102 */ |
| 103 devtools.profiler.ViewBuilder.prototype.createViewNode = function( | 103 devtools.profiler.ViewBuilder.prototype.createViewNode = function( |
| 104 funcName, totalTime, selfTime, head) { | 104 funcName, totalTime, selfTime, head) { |
| 105 return new devtools.profiler.ProfileView.Node( | 105 return new devtools.profiler.ProfileView.Node( |
| 106 funcName, totalTime, selfTime, head); | 106 funcName, totalTime, selfTime, head); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 | 109 |
| 110 /** | 110 /** |
| 111 * Creates a Profile View object. It allows to perform sorting | 111 * Creates a Profile View object. It allows to perform sorting |
| 112 * and filtering actions on the profile. Profile View mimicks | 112 * and filtering actions on the profile. |
| 113 * the Profile object from WebKit's JSC profiler. | |
| 114 * | 113 * |
| 115 * @param {devtools.profiler.ProfileView.Node} head Head (root) node. | 114 * @param {devtools.profiler.ProfileView.Node} head Head (root) node. |
| 116 * @constructor | 115 * @constructor |
| 117 */ | 116 */ |
| 118 devtools.profiler.ProfileView = function(head) { | 117 devtools.profiler.ProfileView = function(head) { |
| 119 this.head = head; | 118 this.head = head; |
| 120 this.title = ''; | |
| 121 this.uid = ''; | |
| 122 this.heavyProfile = null; | |
| 123 this.treeProfile = null; | |
| 124 this.flatProfile = null; | |
| 125 }; | 119 }; |
| 126 | 120 |
| 127 | 121 |
| 128 /** | 122 /** |
| 129 * Sorts the profile view using the specified sort function. | 123 * Sorts the profile view using the specified sort function. |
| 130 * | 124 * |
| 131 * @param {function(devtools.profiler.ProfileView.Node, | 125 * @param {function(devtools.profiler.ProfileView.Node, |
| 132 * devtools.profiler.ProfileView.Node):number} sortFunc A sorting | 126 * devtools.profiler.ProfileView.Node):number} sortFunc A sorting |
| 133 * functions. Must comply with Array.sort sorting function requirements. | 127 * functions. Must comply with Array.sort sorting function requirements. |
| 134 */ | 128 */ |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 * Sorts all the node's children recursively. | 215 * Sorts all the node's children recursively. |
| 222 * | 216 * |
| 223 * @param {function(devtools.profiler.ProfileView.Node, | 217 * @param {function(devtools.profiler.ProfileView.Node, |
| 224 * devtools.profiler.ProfileView.Node):number} sortFunc A sorting | 218 * devtools.profiler.ProfileView.Node):number} sortFunc A sorting |
| 225 * functions. Must comply with Array.sort sorting function requirements. | 219 * functions. Must comply with Array.sort sorting function requirements. |
| 226 */ | 220 */ |
| 227 devtools.profiler.ProfileView.Node.prototype.sortChildren = function( | 221 devtools.profiler.ProfileView.Node.prototype.sortChildren = function( |
| 228 sortFunc) { | 222 sortFunc) { |
| 229 this.children.sort(sortFunc); | 223 this.children.sort(sortFunc); |
| 230 }; | 224 }; |
| OLD | NEW |