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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 */ | 546 */ |
547 this._timelineData = { | 547 this._timelineData = { |
548 entryLevels: [], | 548 entryLevels: [], |
549 entryTotalTimes: [], | 549 entryTotalTimes: [], |
550 entryStartTimes: [] | 550 entryStartTimes: [] |
551 }; | 551 }; |
552 | 552 |
553 this._currentLevel = 0; | 553 this._currentLevel = 0; |
554 this._minimumBoundary = this._model.minimumRecordTime() || 0; | 554 this._minimumBoundary = this._model.minimumRecordTime() || 0; |
555 this._timeSpan = Math.max((this._model.maximumRecordTime() || 0) - this.
_minimumBoundary, 1000000); | 555 this._timeSpan = Math.max((this._model.maximumRecordTime() || 0) - this.
_minimumBoundary, 1000000); |
556 var tracingModel = this._model; | |
557 this._appendHeaderRecord("CPU"); | 556 this._appendHeaderRecord("CPU"); |
558 var events = tracingModel.inspectedTargetMainThreadEvents(); | 557 var events = this._traceEventBindings.mainThreadEvents(); |
559 var maxStackDepth = 0; | 558 var maxStackDepth = 0; |
560 for (var eventIndex = 0; eventIndex < events.length; ++eventIndex) { | 559 for (var eventIndex = 0; eventIndex < events.length; ++eventIndex) { |
561 var event = events[eventIndex]; | 560 var event = events[eventIndex]; |
562 var category = event.category; | 561 var category = event.category; |
563 if (category !== "disabled-by-default-devtools.timeline" && category
!== "devtools") | 562 if (category !== "disabled-by-default-devtools.timeline" && category
!== "devtools") |
564 continue; | 563 continue; |
565 if (event.duration || event.phase === WebInspector.TracingModel.Phas
e.Instant) { | 564 if (event.duration || event.phase === WebInspector.TracingModel.Phas
e.Instant) { |
566 this._appendEvent(event); | 565 this._appendEvent(event); |
567 if (maxStackDepth < event.level) | 566 if (maxStackDepth < event.level) |
568 maxStackDepth = event.level; | 567 maxStackDepth = event.level; |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 * @param {number} entryIndex | 982 * @param {number} entryIndex |
984 * @return {?WebInspector.TimelineSelection} | 983 * @return {?WebInspector.TimelineSelection} |
985 */ | 984 */ |
986 createSelection: function(entryIndex) { }, | 985 createSelection: function(entryIndex) { }, |
987 /** | 986 /** |
988 * @param {?WebInspector.TimelineSelection} selection | 987 * @param {?WebInspector.TimelineSelection} selection |
989 * @return {number} | 988 * @return {number} |
990 */ | 989 */ |
991 entryIndexForSelection: function(selection) { } | 990 entryIndexForSelection: function(selection) { } |
992 } | 991 } |
OLD | NEW |