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

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

Issue 9706010: about:tracing support for TRACE_ASYNC_START/FINISH events. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: try again Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/resources/tracing/tests/nonnested_trace.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * @fileoverview Imports text files in the Linux event trace format into the 6 * @fileoverview Imports text files in the Linux event trace format into the
7 * timeline model. This format is output both by sched_trace and by Linux's perf 7 * timeline model. This format is output both by sched_trace and by Linux's perf
8 * tool. 8 * tool.
9 * 9 *
10 * This importer assumes the events arrive as a string. The unit tests provide 10 * This importer assumes the events arrive as a string. The unit tests provide
11 * examples of the trace format. 11 * examples of the trace format.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 * Imports the data in this.events_ into model_. 185 * Imports the data in this.events_ into model_.
186 */ 186 */
187 importEvents: function() { 187 importEvents: function() {
188 this.importCpuData(); 188 this.importCpuData();
189 if (!this.alignClocks()) 189 if (!this.alignClocks())
190 return; 190 return;
191 this.buildPerThreadCpuSlicesFromCpuState(); 191 this.buildPerThreadCpuSlicesFromCpuState();
192 }, 192 },
193 193
194 /** 194 /**
195 * Called by the TimelineModel after all other importers have imported their
196 * events.
197 */
198 finalizeImport: function() {
199 },
200
201 /**
195 * Builds the cpuSlices array on each thread based on our knowledge of what 202 * Builds the cpuSlices array on each thread based on our knowledge of what
196 * each Cpu is doing. This is done only for TimelineThreads that are 203 * each Cpu is doing. This is done only for TimelineThreads that are
197 * already in the model, on the assumption that not having any traced data 204 * already in the model, on the assumption that not having any traced data
198 * on a thread means that it is not of interest to the user. 205 * on a thread means that it is not of interest to the user.
199 */ 206 */
200 buildPerThreadCpuSlicesFromCpuState: function() { 207 buildPerThreadCpuSlicesFromCpuState: function() {
201 // Push the cpu slices to the threads that they run on. 208 // Push the cpu slices to the threads that they run on.
202 for (var cpuNumber in this.cpuStates_) { 209 for (var cpuNumber in this.cpuStates_) {
203 var cpuState = this.cpuStates_[cpuNumber]; 210 var cpuState = this.cpuStates_[cpuNumber];
204 var cpu = cpuState.cpu; 211 var cpu = cpuState.cpu;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 }; 501 };
495 502
496 tracing.TimelineModel.registerImporter(LinuxPerfImporter); 503 tracing.TimelineModel.registerImporter(LinuxPerfImporter);
497 504
498 return { 505 return {
499 LinuxPerfImporter: LinuxPerfImporter, 506 LinuxPerfImporter: LinuxPerfImporter,
500 _LinuxPerfImporterTestExports: TestExports 507 _LinuxPerfImporterTestExports: TestExports
501 }; 508 };
502 509
503 }); 510 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/tracing/tests/nonnested_trace.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698