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

Side by Side Diff: tools/tickprocessor.js

Issue 574015: Profiler tick processor: exploit d8's readline to avoid reading (Closed)
Patch Set: Re-upload Created 10 years, 10 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/logreader.js ('k') | tools/windows-tick-processor.bat » ('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 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 }; 255 };
256 256
257 257
258 TickProcessor.prototype.isJsCode = function(name) { 258 TickProcessor.prototype.isJsCode = function(name) {
259 return !(name in this.codeTypes_); 259 return !(name in this.codeTypes_);
260 }; 260 };
261 261
262 262
263 TickProcessor.prototype.processLogFile = function(fileName) { 263 TickProcessor.prototype.processLogFile = function(fileName) {
264 this.lastLogFileName_ = fileName; 264 this.lastLogFileName_ = fileName;
265 var contents = readFile(fileName); 265 var line;
266 this.processLogChunk(contents); 266 while (line = readline()) {
267 this.processLogLine(line);
268 }
267 }; 269 };
268 270
269 271
270 TickProcessor.prototype.processSharedLibrary = function( 272 TickProcessor.prototype.processSharedLibrary = function(
271 name, startAddr, endAddr) { 273 name, startAddr, endAddr) {
272 var entry = this.profile_.addLibrary(name, startAddr, endAddr); 274 var entry = this.profile_.addLibrary(name, startAddr, endAddr);
273 this.setCodeType(entry.getName(), 'SHARED_LIB'); 275 this.setCodeType(entry.getName(), 'SHARED_LIB');
274 276
275 var self = this; 277 var self = this;
276 var libFuncs = this.cppEntriesProvider_.parseVmSymbols( 278 var libFuncs = this.cppEntriesProvider_.parseVmSymbols(
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { 845 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) {
844 synonims.push(synArg); 846 synonims.push(synArg);
845 delete this.argsDispatch_[synArg]; 847 delete this.argsDispatch_[synArg];
846 } 848 }
847 } 849 }
848 print(' ' + padRight(synonims.join(', '), 20) + dispatch[2]); 850 print(' ' + padRight(synonims.join(', '), 20) + dispatch[2]);
849 } 851 }
850 quit(2); 852 quit(2);
851 }; 853 };
852 854
OLDNEW
« no previous file with comments | « tools/logreader.js ('k') | tools/windows-tick-processor.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698