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

Side by Side Diff: chrome/browser/resources/tracing/timeline_model.js

Issue 8359025: Tons of timeline tweaks (Closed)
Patch Set: nits Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 /** 6 /**
7 * @fileoverview TimelineModel is a parsed representation of the 7 * @fileoverview TimelineModel is a parsed representation of the
8 * TraceEvents obtained from base/trace_event in which the begin-end 8 * TraceEvents obtained from base/trace_event in which the begin-end
9 * tokens are converted into a hierarchy of processes, threads, 9 * tokens are converted into a hierarchy of processes, threads,
10 * subrows, and slices. 10 * subrows, and slices.
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } else if (event.ph == 'M') { 323 } else if (event.ph == 'M') {
324 if (event.name == 'thread_name') { 324 if (event.name == 'thread_name') {
325 var thread = this.getOrCreateProcess(event.pid) 325 var thread = this.getOrCreateProcess(event.pid)
326 .getOrCreateThread(event.tid); 326 .getOrCreateThread(event.tid);
327 thread.name = event.args.name; 327 thread.name = event.args.name;
328 } else { 328 } else {
329 this.importErrors.push('Unrecognized metadata name: ' + event.name); 329 this.importErrors.push('Unrecognized metadata name: ' + event.name);
330 } 330 }
331 } else { 331 } else {
332 this.importErrors.push('Unrecognized event phase: ' + event.ph + 332 this.importErrors.push('Unrecognized event phase: ' + event.ph +
333 '(' + event.name + ')'); 333 '(' + event.name + ')');
334 } 334 }
335 } 335 }
336 this.pruneEmptyThreads(); 336 this.pruneEmptyThreads();
337 this.updateBounds(); 337 this.updateBounds();
338 338
339 // Add end events for any events that are still on the stack. These 339 // Add end events for any events that are still on the stack. These
340 // are events that were still open when trace was ended, and can often 340 // are events that were still open when trace was ended, and can often
341 // indicate deadlock behavior. 341 // indicate deadlock behavior.
342 for (var ptid in threadStateByPTID) { 342 for (var ptid in threadStateByPTID) {
343 var state = threadStateByPTID[ptid]; 343 var state = threadStateByPTID[ptid];
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 }; 438 };
439 439
440 return { 440 return {
441 getStringHash: getStringHash, 441 getStringHash: getStringHash,
442 TimelineSlice: TimelineSlice, 442 TimelineSlice: TimelineSlice,
443 TimelineThread: TimelineThread, 443 TimelineThread: TimelineThread,
444 TimelineProcess: TimelineProcess, 444 TimelineProcess: TimelineProcess,
445 TimelineModel: TimelineModel 445 TimelineModel: TimelineModel
446 }; 446 };
447 }); 447 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698