OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 this._appendInteractionRecords(); | 388 this._appendInteractionRecords(); |
389 | 389 |
390 var threads = this._model.virtualThreads(); | 390 var threads = this._model.virtualThreads(); |
391 var compositorThreads = threads.filter(thread => thread.name.startsWith(
"CompositorTileWorker")); | 391 var compositorThreads = threads.filter(thread => thread.name.startsWith(
"CompositorTileWorker")); |
392 var otherThreads = threads.filter(thread => !thread.name.startsWith("Com
positorTileWorker")); | 392 var otherThreads = threads.filter(thread => !thread.name.startsWith("Com
positorTileWorker")); |
393 if (compositorThreads.length) { | 393 if (compositorThreads.length) { |
394 this._appendHeader(WebInspector.UIString("Rasterizer Threads"), this
._headerLevel1); | 394 this._appendHeader(WebInspector.UIString("Rasterizer Threads"), this
._headerLevel1); |
395 for (var i = 0; i < compositorThreads.length; ++i) | 395 for (var i = 0; i < compositorThreads.length; ++i) |
396 this._appendSyncEvents(compositorThreads[i].events, WebInspector
.UIString("Rasterizer Thread %d", i), this._headerLevel2); | 396 this._appendSyncEvents(compositorThreads[i].events, WebInspector
.UIString("Rasterizer Thread %d", i), this._headerLevel2); |
397 } | 397 } |
| 398 this._appendGPUEvents(); |
398 | 399 |
399 this._appendThreadTimelineData(WebInspector.UIString("Main Thread"), thi
s._model.mainThreadEvents(), this._model.mainThreadAsyncEvents(), true); | 400 this._appendThreadTimelineData(WebInspector.UIString("Main Thread"), thi
s._model.mainThreadEvents(), this._model.mainThreadAsyncEvents(), true); |
400 if (Runtime.experiments.isEnabled("gpuTimeline")) | |
401 this._appendGPUEvents(); | |
402 | 401 |
403 otherThreads.forEach(thread => this._appendThreadTimelineData(thread.nam
e, thread.events, thread.asyncEventsByGroup)); | 402 otherThreads.forEach(thread => this._appendThreadTimelineData(thread.nam
e, thread.events, thread.asyncEventsByGroup)); |
404 | 403 |
405 /** | 404 /** |
406 * @param {!WebInspector.TimelineFlameChartMarker} a | 405 * @param {!WebInspector.TimelineFlameChartMarker} a |
407 * @param {!WebInspector.TimelineFlameChartMarker} b | 406 * @param {!WebInspector.TimelineFlameChartMarker} b |
408 */ | 407 */ |
409 function compareStartTime(a, b) | 408 function compareStartTime(a, b) |
410 { | 409 { |
411 return a.startTime() - b.startTime(); | 410 return a.startTime() - b.startTime(); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 this._appendAsyncEvent(asyncEvent, this._currentLevel + level); | 538 this._appendAsyncEvent(asyncEvent, this._currentLevel + level); |
540 lastUsedTimeByLevel[level] = asyncEvent.endTime; | 539 lastUsedTimeByLevel[level] = asyncEvent.endTime; |
541 } | 540 } |
542 this._entryTypeByLevel.length = this._currentLevel + lastUsedTimeByLevel
.length; | 541 this._entryTypeByLevel.length = this._currentLevel + lastUsedTimeByLevel
.length; |
543 this._entryTypeByLevel.fill(WebInspector.TimelineFlameChartEntryType.Eve
nt, this._currentLevel); | 542 this._entryTypeByLevel.fill(WebInspector.TimelineFlameChartEntryType.Eve
nt, this._currentLevel); |
544 this._currentLevel += lastUsedTimeByLevel.length; | 543 this._currentLevel += lastUsedTimeByLevel.length; |
545 }, | 544 }, |
546 | 545 |
547 _appendGPUEvents: function() | 546 _appendGPUEvents: function() |
548 { | 547 { |
549 if (this._appendSyncEvents(this._model.gpuTasks().map(record => record.t
raceEvent()), WebInspector.UIString("GPU"), this._headerLevel1)) | 548 if (this._appendSyncEvents(this._model.gpuEvents(), WebInspector.UIStrin
g("GPU"), this._headerLevel1, false)) |
550 ++this._currentLevel; | 549 ++this._currentLevel; |
551 }, | 550 }, |
552 | 551 |
553 _appendInteractionRecords: function() | 552 _appendInteractionRecords: function() |
554 { | 553 { |
555 if (!this._irModel) | 554 if (!this._irModel) |
556 return; | 555 return; |
557 this._irModel.interactionRecords().forEach(this._appendSegment, this); | 556 this._irModel.interactionRecords().forEach(this._appendSegment, this); |
558 this._entryTypeByLevel[this._currentLevel++] = WebInspector.TimelineFlam
eChartEntryType.InteractionRecord; | 557 this._entryTypeByLevel[this._currentLevel++] = WebInspector.TimelineFlam
eChartEntryType.InteractionRecord; |
559 }, | 558 }, |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 /** | 1446 /** |
1448 * @constructor | 1447 * @constructor |
1449 * @param {!WebInspector.TimelineSelection} selection | 1448 * @param {!WebInspector.TimelineSelection} selection |
1450 * @param {number} entryIndex | 1449 * @param {number} entryIndex |
1451 */ | 1450 */ |
1452 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) | 1451 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) |
1453 { | 1452 { |
1454 this.timelineSelection = selection; | 1453 this.timelineSelection = selection; |
1455 this.entryIndex = entryIndex; | 1454 this.entryIndex = entryIndex; |
1456 } | 1455 } |
OLD | NEW |