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

Side by Side Diff: tools/tickprocessor.js

Issue 119076: Make tickprocessor's ProfileView extensible and move out DevTools-only stuff. (Closed)
Patch Set: Created 11 years, 6 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 | « tools/profile_view.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 this.ticks_.excluded + ' excluded).'); 266 this.ticks_.excluded + ' excluded).');
267 267
268 if (this.ticks_.total == 0) return; 268 if (this.ticks_.total == 0) return;
269 269
270 // Print the unknown ticks percentage if they are not ignored. 270 // Print the unknown ticks percentage if they are not ignored.
271 if (!this.ignoreUnknown_ && this.ticks_.unaccounted > 0) { 271 if (!this.ignoreUnknown_ && this.ticks_.unaccounted > 0) {
272 this.printHeader('Unknown'); 272 this.printHeader('Unknown');
273 this.printCounter(this.ticks_.unaccounted, this.ticks_.total); 273 this.printCounter(this.ticks_.unaccounted, this.ticks_.total);
274 } 274 }
275 275
276 // Disable initialization of 'funcName', 'url', 'lineNumber' as
277 // we don't use it and it just wastes time.
278 devtools.profiler.ProfileView.Node.prototype.initFuncInfo = function() {};
279
280 var flatProfile = this.profile_.getFlatProfile(); 276 var flatProfile = this.profile_.getFlatProfile();
281 var flatView = this.viewBuilder_.buildView(flatProfile); 277 var flatView = this.viewBuilder_.buildView(flatProfile);
282 // Sort by self time, desc, then by name, desc. 278 // Sort by self time, desc, then by name, desc.
283 flatView.sort(function(rec1, rec2) { 279 flatView.sort(function(rec1, rec2) {
284 return rec2.selfTime - rec1.selfTime || 280 return rec2.selfTime - rec1.selfTime ||
285 (rec2.internalFuncName < rec1.internalFuncName ? -1 : 1); }); 281 (rec2.internalFuncName < rec1.internalFuncName ? -1 : 1); });
286 var totalTicks = this.ticks_.total; 282 var totalTicks = this.ticks_.total;
287 if (this.ignoreUnknown_) { 283 if (this.ignoreUnknown_) {
288 totalTicks -= this.ticks_.unaccounted; 284 totalTicks -= this.ticks_.unaccounted;
289 } 285 }
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 633
638 var params = processArguments(arguments); 634 var params = processArguments(arguments);
639 var tickProcessor = new TickProcessor( 635 var tickProcessor = new TickProcessor(
640 params.platform == 'unix' ? new UnixCppEntriesProvider() : 636 params.platform == 'unix' ? new UnixCppEntriesProvider() :
641 new WindowsCppEntriesProvider(), 637 new WindowsCppEntriesProvider(),
642 params.separateIc, 638 params.separateIc,
643 params.ignoreUnknown, 639 params.ignoreUnknown,
644 params.stateFilter); 640 params.stateFilter);
645 tickProcessor.processLogFile(params.logFileName); 641 tickProcessor.processLogFile(params.logFileName);
646 tickProcessor.printStatistics(); 642 tickProcessor.printStatistics();
OLDNEW
« no previous file with comments | « tools/profile_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698