Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineModel.js

Issue 552323002: DevTools: log worker thread ids on the main thread when Timeline recording is enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/timeline/TracingModel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.TracingManager} tracingManager 7 * @param {!WebInspector.TracingManager} tracingManager
8 * @param {!WebInspector.TracingModel} tracingModel 8 * @param {!WebInspector.TracingModel} tracingModel
9 * @param {!WebInspector.TimelineModel.Filter} recordFilter 9 * @param {!WebInspector.TimelineModel.Filter} recordFilter
10 * @extends {WebInspector.TimelineModel} 10 * @extends {WebInspector.TimelineModel}
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 WebSocketCreate : "WebSocketCreate", 83 WebSocketCreate : "WebSocketCreate",
84 WebSocketSendHandshakeRequest : "WebSocketSendHandshakeRequest", 84 WebSocketSendHandshakeRequest : "WebSocketSendHandshakeRequest",
85 WebSocketReceiveHandshakeResponse : "WebSocketReceiveHandshakeResponse", 85 WebSocketReceiveHandshakeResponse : "WebSocketReceiveHandshakeResponse",
86 WebSocketDestroy : "WebSocketDestroy", 86 WebSocketDestroy : "WebSocketDestroy",
87 87
88 EmbedderCallback : "EmbedderCallback", 88 EmbedderCallback : "EmbedderCallback",
89 89
90 CallStack: "CallStack", 90 CallStack: "CallStack",
91 SetLayerTreeId: "SetLayerTreeId", 91 SetLayerTreeId: "SetLayerTreeId",
92 TracingStartedInPage: "TracingStartedInPage", 92 TracingStartedInPage: "TracingStartedInPage",
93 TracingStartedInWorker: "TracingStartedInWorker", 93 TracingSessionIdForWorker: "TracingSessionIdForWorker",
94 94
95 DecodeImage: "Decode Image", 95 DecodeImage: "Decode Image",
96 ResizeImage: "Resize Image", 96 ResizeImage: "Resize Image",
97 DrawLazyPixelRef: "Draw LazyPixelRef", 97 DrawLazyPixelRef: "Draw LazyPixelRef",
98 DecodeLazyPixelRef: "Decode LazyPixelRef", 98 DecodeLazyPixelRef: "Decode LazyPixelRef",
99 99
100 LazyPixelRef: "LazyPixelRef", 100 LazyPixelRef: "LazyPixelRef",
101 LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl", 101 LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl",
102 PictureSnapshot: "cc::Picture" 102 PictureSnapshot: "cc::Picture"
103 }; 103 };
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 var process = event.thread.process(); 240 var process = event.thread.process();
241 var startTime = event.startTime; 241 var startTime = event.startTime;
242 242
243 var endTime = Infinity; 243 var endTime = Infinity;
244 if (i + 1 < length) 244 if (i + 1 < length)
245 endTime = events[i + 1].startTime; 245 endTime = events[i + 1].startTime;
246 246
247 var threads = process.sortedThreads(); 247 var threads = process.sortedThreads();
248 for (var j = 0; j < threads.length; j++) { 248 for (var j = 0; j < threads.length; j++) {
249 var thread = threads[j]; 249 var thread = threads[j];
250 if (thread.name() === "WebCore: Worker" && !workerMetadataEvents .some(function(e) { return e.thread === thread; })) 250 if (thread.name() === "WebCore: Worker" && !workerMetadataEvents .some(function(e) { return e.args["data"]["workerThreadId"] === thread.id(); }))
251 continue; 251 continue;
252 this._processThreadEvents(startTime, endTime, event.thread, thre ad); 252 this._processThreadEvents(startTime, endTime, event.thread, thre ad);
253 } 253 }
254 } 254 }
255 this._resetProcessingState(); 255 this._resetProcessingState();
256 256
257 this._inspectedTargetEvents.sort(WebInspector.TracingModel.Event.compare StartTime); 257 this._inspectedTargetEvents.sort(WebInspector.TracingModel.Event.compare StartTime);
258 258
259 if (this._cpuProfile) { 259 if (this._cpuProfile) {
260 var jsSamples = WebInspector.TimelineJSProfileProcessor.generateTrac ingEventsFromCpuProfile(this, this._cpuProfile); 260 var jsSamples = WebInspector.TimelineJSProfileProcessor.generateTrac ingEventsFromCpuProfile(this, this._cpuProfile);
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 }, 1061 },
1062 1062
1063 _didWriteNextChunk: function(stream) 1063 _didWriteNextChunk: function(stream)
1064 { 1064 {
1065 if (this._recordIndex === this._payloads.length) 1065 if (this._recordIndex === this._payloads.length)
1066 stream.close(); 1066 stream.close();
1067 else 1067 else
1068 this._writeNextChunk(stream); 1068 this._writeNextChunk(stream);
1069 } 1069 }
1070 } 1070 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TracingModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698