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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 return this._timelineData; | 158 return this._timelineData; |
159 | 159 |
160 this._timelineData = new WebInspector.FlameChart.TimelineData([], [], []
); | 160 this._timelineData = new WebInspector.FlameChart.TimelineData([], [], []
); |
161 | 161 |
162 this._minimumBoundary = this._model.minimumRecordTime(); | 162 this._minimumBoundary = this._model.minimumRecordTime(); |
163 this._timeSpan = this._model.isEmpty() ? 1000 : this._model.maximumReco
rdTime() - this._minimumBoundary; | 163 this._timeSpan = this._model.isEmpty() ? 1000 : this._model.maximumReco
rdTime() - this._minimumBoundary; |
164 this._currentLevel = 0; | 164 this._currentLevel = 0; |
165 this._appendFrameBars(this._frameModel.frames()); | 165 this._appendFrameBars(this._frameModel.frames()); |
166 this._appendThreadTimelineData(WebInspector.UIString("Main Thread"), thi
s._model.mainThreadEvents()); | 166 this._appendThreadTimelineData(WebInspector.UIString("Main Thread"), thi
s._model.mainThreadEvents()); |
167 var threads = this._model.virtualThreads(); | 167 var threads = this._model.virtualThreads(); |
168 for (var threadName in threads) { | 168 for (var i = 0; i < threads.length; i++) { |
169 if (threadName !== WebInspector.TimelineModel.MainThreadName) | 169 var thread = threads[i]; |
170 this._appendThreadTimelineData(threadName, threads[threadName]); | 170 this._appendThreadTimelineData(thread.name, thread.events); |
171 } | 171 } |
172 return this._timelineData; | 172 return this._timelineData; |
173 }, | 173 }, |
174 | 174 |
175 /** | 175 /** |
176 * @param {string} headerName | 176 * @param {string} headerName |
177 * @param {!Array.<!WebInspector.TracingModel.Event>} traceEvents | 177 * @param {!Array.<!WebInspector.TracingModel.Event>} traceEvents |
178 */ | 178 */ |
179 _appendThreadTimelineData: function(headerName, traceEvents) | 179 _appendThreadTimelineData: function(headerName, traceEvents) |
180 { | 180 { |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 /** | 777 /** |
778 * @constructor | 778 * @constructor |
779 * @param {!WebInspector.TimelineSelection} selection | 779 * @param {!WebInspector.TimelineSelection} selection |
780 * @param {number} entryIndex | 780 * @param {number} entryIndex |
781 */ | 781 */ |
782 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) | 782 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) |
783 { | 783 { |
784 this.timelineSelection = selection; | 784 this.timelineSelection = selection; |
785 this.entryIndex = entryIndex; | 785 this.entryIndex = entryIndex; |
786 } | 786 } |
OLD | NEW |