OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 return eventDivider; | 226 return eventDivider; |
227 } | 227 } |
228 | 228 |
229 WebInspector.TimelinePresentationModel._hiddenRecords = { } | 229 WebInspector.TimelinePresentationModel._hiddenRecords = { } |
230 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkDOMContent] = 1; | 230 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkDOMContent] = 1; |
231 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkLoad] = 1; | 231 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.MarkLoad] = 1; |
232 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.ScheduleStyleRecalculation] = 1; | 232 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.ScheduleStyleRecalculation] = 1; |
233 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.InvalidateLayout] = 1; | 233 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.InvalidateLayout] = 1; |
234 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.GPUTask] = 1; | 234 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.GPUTask] = 1; |
| 235 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
.RecordType.ActivateLayerTree] = 1; |
235 | 236 |
236 WebInspector.TimelinePresentationModel.prototype = { | 237 WebInspector.TimelinePresentationModel.prototype = { |
237 /** | 238 /** |
238 * @param {!WebInspector.TimelinePresentationModel.Filter} filter | 239 * @param {!WebInspector.TimelinePresentationModel.Filter} filter |
239 */ | 240 */ |
240 addFilter: function(filter) | 241 addFilter: function(filter) |
241 { | 242 { |
242 this._filters.push(filter); | 243 this._filters.push(filter); |
243 }, | 244 }, |
244 | 245 |
(...skipping 29 matching lines...) Expand all Loading... |
274 this._frames = []; | 275 this._frames = []; |
275 this._minimumRecordTime = -1; | 276 this._minimumRecordTime = -1; |
276 this._layoutInvalidateStack = {}; | 277 this._layoutInvalidateStack = {}; |
277 this._lastScheduleStyleRecalculation = {}; | 278 this._lastScheduleStyleRecalculation = {}; |
278 this._webSocketCreateRecords = {}; | 279 this._webSocketCreateRecords = {}; |
279 this._coalescingBuckets = {}; | 280 this._coalescingBuckets = {}; |
280 }, | 281 }, |
281 | 282 |
282 addFrame: function(frame) | 283 addFrame: function(frame) |
283 { | 284 { |
284 this._frames.push(frame); | 285 if (!frame.isBackground) |
| 286 this._frames.push(frame); |
285 }, | 287 }, |
286 | 288 |
287 /** | 289 /** |
288 * @param {TimelineAgent.TimelineEvent} record | 290 * @param {TimelineAgent.TimelineEvent} record |
289 * @return {Array.<WebInspector.TimelinePresentationModel.Record>} | 291 * @return {Array.<WebInspector.TimelinePresentationModel.Record>} |
290 */ | 292 */ |
291 addRecord: function(record) | 293 addRecord: function(record) |
292 { | 294 { |
293 if (this._minimumRecordTime === -1 || record.startTime < this._minimumRe
cordTime) | 295 if (this._minimumRecordTime === -1 || record.startTime < this._minimumRe
cordTime) |
294 this._minimumRecordTime = WebInspector.TimelineModel.startTimeInSeco
nds(record); | 296 this._minimumRecordTime = WebInspector.TimelineModel.startTimeInSeco
nds(record); |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1551 | 1553 |
1552 WebInspector.TimelinePresentationModel.generatePopupContentForFrame = function(f
rame) | 1554 WebInspector.TimelinePresentationModel.generatePopupContentForFrame = function(f
rame) |
1553 { | 1555 { |
1554 var contentHelper = new WebInspector.TimelinePopupContentHelper(WebInspector
.UIString("Frame")); | 1556 var contentHelper = new WebInspector.TimelinePopupContentHelper(WebInspector
.UIString("Frame")); |
1555 var durationInSeconds = frame.endTime - frame.startTime; | 1557 var durationInSeconds = frame.endTime - frame.startTime; |
1556 var durationText = WebInspector.UIString("%s (at %s)", Number.secondsToStrin
g(frame.endTime - frame.startTime, true), | 1558 var durationText = WebInspector.UIString("%s (at %s)", Number.secondsToStrin
g(frame.endTime - frame.startTime, true), |
1557 Number.secondsToString(frame.startTimeOffset, true)); | 1559 Number.secondsToString(frame.startTimeOffset, true)); |
1558 contentHelper.appendTextRow(WebInspector.UIString("Duration"), durationText)
; | 1560 contentHelper.appendTextRow(WebInspector.UIString("Duration"), durationText)
; |
1559 contentHelper.appendTextRow(WebInspector.UIString("FPS"), Math.floor(1 / dur
ationInSeconds)); | 1561 contentHelper.appendTextRow(WebInspector.UIString("FPS"), Math.floor(1 / dur
ationInSeconds)); |
1560 contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.second
sToString(frame.cpuTime, true)); | 1562 contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.second
sToString(frame.cpuTime, true)); |
| 1563 contentHelper.appendTextRow(WebInspector.UIString("Thread"), frame.isBackgro
und ? WebInspector.UIString("background") : WebInspector.UIString("main")); |
1561 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Time"), | 1564 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Time"), |
1562 WebInspector.TimelinePresentationModel._generateAggregatedInfo(frame.tim
eByCategory)); | 1565 WebInspector.TimelinePresentationModel._generateAggregatedInfo(frame.tim
eByCategory)); |
1563 | |
1564 return contentHelper.contentTable(); | 1566 return contentHelper.contentTable(); |
1565 } | 1567 } |
1566 | 1568 |
1567 /** | 1569 /** |
1568 * @param {WebInspector.FrameStatistics} statistics | 1570 * @param {WebInspector.FrameStatistics} statistics |
1569 */ | 1571 */ |
1570 WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics =
function(statistics) | 1572 WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics =
function(statistics) |
1571 { | 1573 { |
1572 /** | 1574 /** |
1573 * @param {number} time | 1575 * @param {number} time |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1859 for (var i = 0; i < stackTrace.length; ++i) { | 1861 for (var i = 0; i < stackTrace.length; ++i) { |
1860 var stackFrame = stackTrace[i]; | 1862 var stackFrame = stackTrace[i]; |
1861 var row = stackTraceElement.createChild("div"); | 1863 var row = stackTraceElement.createChild("div"); |
1862 row.createTextChild(stackFrame.functionName || WebInspector.UIString
("(anonymous function)")); | 1864 row.createTextChild(stackFrame.functionName || WebInspector.UIString
("(anonymous function)")); |
1863 row.createTextChild(" @ "); | 1865 row.createTextChild(" @ "); |
1864 var urlElement = callFrameLinkifier(stackFrame); | 1866 var urlElement = callFrameLinkifier(stackFrame); |
1865 row.appendChild(urlElement); | 1867 row.appendChild(urlElement); |
1866 } | 1868 } |
1867 } | 1869 } |
1868 } | 1870 } |
OLD | NEW |