| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 * @return {string} | 338 * @return {string} |
| 339 */ | 339 */ |
| 340 formatPercent: function(value, node) | 340 formatPercent: function(value, node) |
| 341 { | 341 { |
| 342 return node.profileNode === this._profileView.profile.idleNode ? "" : We
bInspector.UIString("%.2f\u2009%%", value); | 342 return node.profileNode === this._profileView.profile.idleNode ? "" : We
bInspector.UIString("%.2f\u2009%%", value); |
| 343 }, | 343 }, |
| 344 | 344 |
| 345 /** | 345 /** |
| 346 * @override | 346 * @override |
| 347 * @param {!WebInspector.ProfileDataGridNode} node | 347 * @param {!WebInspector.ProfileDataGridNode} node |
| 348 * @return {!Element} | 348 * @return {?Element} |
| 349 */ | 349 */ |
| 350 linkifyNode: function(node) | 350 linkifyNode: function(node) |
| 351 { | 351 { |
| 352 return this._profileView.linkifier().linkifyConsoleCallFrame(this._profi
leView.target(), node.profileNode.callFrame, "profile-node-file"); | 352 return this._profileView.linkifier().maybeLinkifyConsoleCallFrame(this._
profileView.target(), node.profileNode.callFrame, "profile-node-file"); |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 | 355 |
| 356 /** | 356 /** |
| 357 * @constructor | 357 * @constructor |
| 358 * @extends {WebInspector.ProfileFlameChartDataProvider} | 358 * @extends {WebInspector.ProfileFlameChartDataProvider} |
| 359 * @param {!WebInspector.CPUProfileDataModel} cpuProfile | 359 * @param {!WebInspector.CPUProfileDataModel} cpuProfile |
| 360 * @param {?WebInspector.Target} target | 360 * @param {?WebInspector.Target} target |
| 361 */ | 361 */ |
| 362 WebInspector.CPUFlameChartDataProvider = function(cpuProfile, target) | 362 WebInspector.CPUFlameChartDataProvider = function(cpuProfile, target) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 return WebInspector.UIString("%.1f\u2009ms", ms); | 478 return WebInspector.UIString("%.1f\u2009ms", ms); |
| 479 return Number.secondsToString(ms / 1000, true); | 479 return Number.secondsToString(ms / 1000, true); |
| 480 } | 480 } |
| 481 var name = WebInspector.beautifyFunctionName(node.functionName); | 481 var name = WebInspector.beautifyFunctionName(node.functionName); |
| 482 pushEntryInfoRow(WebInspector.UIString("Name"), name); | 482 pushEntryInfoRow(WebInspector.UIString("Name"), name); |
| 483 var selfTime = millisecondsToString(this._entrySelfTimes[entryIndex]); | 483 var selfTime = millisecondsToString(this._entrySelfTimes[entryIndex]); |
| 484 var totalTime = millisecondsToString(timelineData.entryTotalTimes[entryI
ndex]); | 484 var totalTime = millisecondsToString(timelineData.entryTotalTimes[entryI
ndex]); |
| 485 pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime); | 485 pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime); |
| 486 pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime); | 486 pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime); |
| 487 var linkifier = new WebInspector.Linkifier(); | 487 var linkifier = new WebInspector.Linkifier(); |
| 488 var text = linkifier.linkifyConsoleCallFrame(this._target, node.callFram
e).textContent; | 488 var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.cal
lFrame); |
| 489 if (link) |
| 490 pushEntryInfoRow(WebInspector.UIString("URL"), link.textContent); |
| 489 linkifier.dispose(); | 491 linkifier.dispose(); |
| 490 pushEntryInfoRow(WebInspector.UIString("URL"), text); | |
| 491 pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.s
econdsToString(node.self / 1000, true)); | 492 pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.s
econdsToString(node.self / 1000, true)); |
| 492 pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number.
secondsToString(node.total / 1000, true)); | 493 pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number.
secondsToString(node.total / 1000, true)); |
| 493 if (node.deoptReason && node.deoptReason !== "no reason") | 494 if (node.deoptReason && node.deoptReason !== "no reason") |
| 494 pushEntryInfoRow(WebInspector.UIString("Not optimized"), node.deoptR
eason); | 495 pushEntryInfoRow(WebInspector.UIString("Not optimized"), node.deoptR
eason); |
| 495 | 496 |
| 496 return entryInfo; | 497 return entryInfo; |
| 497 }, | 498 }, |
| 498 | 499 |
| 499 __proto__: WebInspector.ProfileFlameChartDataProvider.prototype | 500 __proto__: WebInspector.ProfileFlameChartDataProvider.prototype |
| 500 } | 501 } |
| OLD | NEW |