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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 columns.push({id: "function", title: WebInspector.UIString("Function"), disc losure: true, sortable: true}); | 45 columns.push({id: "function", title: WebInspector.UIString("Function"), disc losure: true, sortable: true}); |
46 | 46 |
47 this.dataGrid = new WebInspector.DataGrid(columns); | 47 this.dataGrid = new WebInspector.DataGrid(columns); |
48 this.dataGrid.addEventListener(WebInspector.DataGrid.Events.SortingChanged, this._sortProfile, this); | 48 this.dataGrid.addEventListener(WebInspector.DataGrid.Events.SortingChanged, this._sortProfile, this); |
49 this.dataGrid.element.addEventListener("mousedown", this._mouseDownInDataGri d.bind(this), true); | 49 this.dataGrid.element.addEventListener("mousedown", this._mouseDownInDataGri d.bind(this), true); |
50 this.dataGrid.show(this.element); | 50 this.dataGrid.show(this.element); |
51 | 51 |
52 this.viewSelectComboBox = new WebInspector.StatusBarComboBox(this._changeVie w.bind(this)); | 52 this.viewSelectComboBox = new WebInspector.StatusBarComboBox(this._changeVie w.bind(this)); |
53 | 53 |
54 var options = {}; | 54 var options = {}; |
55 options[WebInspector.CPUProfileView._TypeFlame] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Flame Chart"), "", WebInspector.CPUProfileView ._TypeFlame); | 55 options[WebInspector.CPUProfileView._TypeFlame] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Icicle Chart"), "", WebInspector.CPUProfileVie w._TypeFlame); |
56 options[WebInspector.CPUProfileView._TypeHeavy] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Heavy (Bottom Up)"), "", WebInspector.CPUProfi leView._TypeHeavy); | 56 options[WebInspector.CPUProfileView._TypeHeavy] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Heavy (Bottom Up)"), "", WebInspector.CPUProfi leView._TypeHeavy); |
57 options[WebInspector.CPUProfileView._TypeTree] = this.viewSelectComboBox.cre ateOption(WebInspector.UIString("Tree (Top Down)"), "", WebInspector.CPUProfileV iew._TypeTree); | 57 options[WebInspector.CPUProfileView._TypeTree] = this.viewSelectComboBox.cre ateOption(WebInspector.UIString("Tree (Top Down)"), "", WebInspector.CPUProfileV iew._TypeTree); |
58 | 58 |
59 var optionName = this._viewType.get() || WebInspector.CPUProfileView._TypeFl ame; | 59 var optionName = this._viewType.get() || WebInspector.CPUProfileView._TypeFl ame; |
60 var option = options[optionName] || options[WebInspector.CPUProfileView._Typ eFlame]; | 60 var option = options[optionName] || options[WebInspector.CPUProfileView._Typ eFlame]; |
61 this.viewSelectComboBox.select(option); | 61 this.viewSelectComboBox.select(option); |
62 | 62 |
63 this._statusBarButtonsElement = document.createElement("span"); | 63 this._statusBarButtonsElement = document.createElement("span"); |
64 | 64 |
65 this.percentButton = new WebInspector.StatusBarButton("", "percent-time-stat us-bar-item"); | 65 this.percentButton = new WebInspector.StatusBarButton("", "percent-time-stat us-bar-item"); |
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1277 row.title = title; | 1277 row.title = title; |
1278 row.text = text; | 1278 row.text = text; |
1279 entryInfo.push(row); | 1279 entryInfo.push(row); |
1280 } | 1280 } |
1281 | 1281 |
1282 pushEntryInfoRow(WebInspector.UIString("Name"), node.functionName); | 1282 pushEntryInfoRow(WebInspector.UIString("Name"), node.functionName); |
1283 var selfTime = this._millisecondsToString(this._entrySelfTimes[entryInde x]); | 1283 var selfTime = this._millisecondsToString(this._entrySelfTimes[entryInde x]); |
1284 var totalTime = this._millisecondsToString(timelineData.entryTotalTimes[ entryIndex]); | 1284 var totalTime = this._millisecondsToString(timelineData.entryTotalTimes[ entryIndex]); |
1285 pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime); | 1285 pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime); |
1286 pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime); | 1286 pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime); |
1287 if (node.url) | 1287 pushEntryInfoRow(WebInspector.UIString("URL"), node.url ? node.url : Web Inspector.UIString("VM%s", node.scriptId) + ":" + node.lineNumber); |
pfeldman
2014/03/25 16:32:22
You should create and linkify raw location instead
| |
1288 pushEntryInfoRow(WebInspector.UIString("URL"), node.url + ":" + node .lineNumber); | |
1289 pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.s econdsToString(node.selfTime / 1000, true)); | 1288 pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.s econdsToString(node.selfTime / 1000, true)); |
1290 pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number. secondsToString(node.totalTime / 1000, true)); | 1289 pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number. secondsToString(node.totalTime / 1000, true)); |
1291 if (node.deoptReason && node.deoptReason !== "no reason") | 1290 if (node.deoptReason && node.deoptReason !== "no reason") |
1292 pushEntryInfoRow(WebInspector.UIString("Not optimized"), node.deoptR eason); | 1291 pushEntryInfoRow(WebInspector.UIString("Not optimized"), node.deoptR eason); |
1293 | 1292 |
1294 return entryInfo; | 1293 return entryInfo; |
1295 }, | 1294 }, |
1296 | 1295 |
1297 /** | 1296 /** |
1298 * @param {number} entryIndex | 1297 * @param {number} entryIndex |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1386 | 1385 |
1387 /** | 1386 /** |
1388 * @param {number} entryIndex | 1387 * @param {number} entryIndex |
1389 * @return {!string} | 1388 * @return {!string} |
1390 */ | 1389 */ |
1391 textColor: function(entryIndex) | 1390 textColor: function(entryIndex) |
1392 { | 1391 { |
1393 return "#333"; | 1392 return "#333"; |
1394 } | 1393 } |
1395 } | 1394 } |
OLD | NEW |