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

Side by Side Diff: tools/tickprocessor.js

Issue 148503002: A64: Synchronize with r15545. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « tools/profviz/worker.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 processor: this.processCodeCreation }, 162 processor: this.processCodeCreation },
163 'code-move': { parsers: [parseInt, parseInt], 163 'code-move': { parsers: [parseInt, parseInt],
164 processor: this.processCodeMove }, 164 processor: this.processCodeMove },
165 'code-delete': { parsers: [parseInt], 165 'code-delete': { parsers: [parseInt],
166 processor: this.processCodeDelete }, 166 processor: this.processCodeDelete },
167 'sfi-move': { parsers: [parseInt, parseInt], 167 'sfi-move': { parsers: [parseInt, parseInt],
168 processor: this.processFunctionMove }, 168 processor: this.processFunctionMove },
169 'snapshot-pos': { parsers: [parseInt, parseInt], 169 'snapshot-pos': { parsers: [parseInt, parseInt],
170 processor: this.processSnapshotPosition }, 170 processor: this.processSnapshotPosition },
171 'tick': { 171 'tick': {
172 parsers: [parseInt, parseInt, parseInt, parseInt, 172 parsers: [parseInt, parseInt, parseInt,
173 parseInt, parseInt, 'var-args'], 173 parseInt, parseInt, 'var-args'],
174 processor: this.processTick }, 174 processor: this.processTick },
175 'heap-sample-begin': { parsers: [null, null, parseInt], 175 'heap-sample-begin': { parsers: [null, null, parseInt],
176 processor: this.processHeapSampleBegin }, 176 processor: this.processHeapSampleBegin },
177 'heap-sample-end': { parsers: [null, null], 177 'heap-sample-end': { parsers: [null, null],
178 processor: this.processHeapSampleEnd }, 178 processor: this.processHeapSampleEnd },
179 'timer-event-start' : { parsers: [null, null, null], 179 'timer-event-start' : { parsers: [null, null, null],
180 processor: this.advanceDistortion }, 180 processor: this.advanceDistortion },
181 'timer-event-end' : { parsers: [null, null, null], 181 'timer-event-end' : { parsers: [null, null, null],
182 processor: this.advanceDistortion }, 182 processor: this.advanceDistortion },
(...skipping 14 matching lines...) Expand all
197 this.stateFilter_ = stateFilter; 197 this.stateFilter_ = stateFilter;
198 this.snapshotLogProcessor_ = snapshotLogProcessor; 198 this.snapshotLogProcessor_ = snapshotLogProcessor;
199 this.deserializedEntriesNames_ = []; 199 this.deserializedEntriesNames_ = [];
200 var ticks = this.ticks_ = 200 var ticks = this.ticks_ =
201 { total: 0, unaccounted: 0, excluded: 0, gc: 0 }; 201 { total: 0, unaccounted: 0, excluded: 0, gc: 0 };
202 202
203 distortion = parseInt(distortion); 203 distortion = parseInt(distortion);
204 // Convert picoseconds to nanoseconds. 204 // Convert picoseconds to nanoseconds.
205 this.distortion_per_entry = isNaN(distortion) ? 0 : (distortion / 1000); 205 this.distortion_per_entry = isNaN(distortion) ? 0 : (distortion / 1000);
206 this.distortion = 0; 206 this.distortion = 0;
207 var rangelimits = range.split(","); 207 var rangelimits = range ? range.split(",") : [];
208 var range_start = parseInt(rangelimits[0]); 208 var range_start = parseInt(rangelimits[0]);
209 var range_end = parseInt(rangelimits[1]); 209 var range_end = parseInt(rangelimits[1]);
210 // Convert milliseconds to nanoseconds. 210 // Convert milliseconds to nanoseconds.
211 this.range_start = isNaN(range_start) ? -Infinity : (range_start * 1000); 211 this.range_start = isNaN(range_start) ? -Infinity : (range_start * 1000);
212 this.range_end = isNaN(range_end) ? Infinity : (range_end * 1000) 212 this.range_end = isNaN(range_end) ? Infinity : (range_end * 1000)
213 213
214 V8Profile.prototype.handleUnknownCode = function( 214 V8Profile.prototype.handleUnknownCode = function(
215 operation, addr, opt_stackPos) { 215 operation, addr, opt_stackPos) {
216 var op = Profile.Operation; 216 var op = Profile.Operation;
217 switch (operation) { 217 switch (operation) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 this.snapshotLogProcessor_.getSerializedEntryName(pos); 358 this.snapshotLogProcessor_.getSerializedEntryName(pos);
359 } 359 }
360 }; 360 };
361 361
362 362
363 TickProcessor.prototype.includeTick = function(vmState) { 363 TickProcessor.prototype.includeTick = function(vmState) {
364 return this.stateFilter_ == null || this.stateFilter_ == vmState; 364 return this.stateFilter_ == null || this.stateFilter_ == vmState;
365 }; 365 };
366 366
367 TickProcessor.prototype.processTick = function(pc, 367 TickProcessor.prototype.processTick = function(pc,
368 sp,
369 ns_since_start, 368 ns_since_start,
370 is_external_callback, 369 is_external_callback,
371 tos_or_external_callback, 370 tos_or_external_callback,
372 vmState, 371 vmState,
373 stack) { 372 stack) {
374 this.distortion += this.distortion_per_entry; 373 this.distortion += this.distortion_per_entry;
375 ns_since_start -= this.distortion; 374 ns_since_start -= this.distortion;
376 if (ns_since_start < this.range_start || ns_since_start > this.range_end) { 375 if (ns_since_start < this.range_start || ns_since_start > this.range_end) {
377 return; 376 return;
378 } 377 }
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { 903 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) {
905 synonims.push(synArg); 904 synonims.push(synArg);
906 delete this.argsDispatch_[synArg]; 905 delete this.argsDispatch_[synArg];
907 } 906 }
908 } 907 }
909 print(' ' + padRight(synonims.join(', '), 20) + dispatch[2]); 908 print(' ' + padRight(synonims.join(', '), 20) + dispatch[2]);
910 } 909 }
911 quit(2); 910 quit(2);
912 }; 911 };
913 912
OLDNEW
« no previous file with comments | « tools/profviz/worker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698