OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 processor: processCodeDeoptEvent }, | 324 processor: processCodeDeoptEvent }, |
325 'current-time': { parsers: [parseTimeStamp], | 325 'current-time': { parsers: [parseTimeStamp], |
326 processor: processCurrentTimeEvent }, | 326 processor: processCurrentTimeEvent }, |
327 'tick': { parsers: [parseInt, parseTimeStamp, | 327 'tick': { parsers: [parseInt, parseTimeStamp, |
328 null, null, parseInt, 'var-args'], | 328 null, null, parseInt, 'var-args'], |
329 processor: processTickEvent } | 329 processor: processTickEvent } |
330 }); | 330 }); |
331 | 331 |
332 var line; | 332 var line; |
333 while (line = input()) { | 333 while (line = input()) { |
334 logreader.processLogLine(line); | 334 for (var s of line.split("\n")) logreader.processLogLine(s); |
335 } | 335 } |
336 | 336 |
337 // Collect execution pauses. | 337 // Collect execution pauses. |
338 for (name in TimerEvents) { | 338 for (name in TimerEvents) { |
339 var event = TimerEvents[name]; | 339 var event = TimerEvents[name]; |
340 if (!event.pause) continue; | 340 if (!event.pause) continue; |
341 var ranges = event.ranges; | 341 var ranges = event.ranges; |
342 for (var j = 0; j < ranges.length; j++) execution_pauses.push(ranges[j]); | 342 for (var j = 0; j < ranges.length; j++) execution_pauses.push(ranges[j]); |
343 } | 343 } |
344 execution_pauses = MergeRanges(execution_pauses); | 344 execution_pauses = MergeRanges(execution_pauses); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 output("plot '-' using 1:2 axes x1y2 with impulses ls 1"); | 542 output("plot '-' using 1:2 axes x1y2 with impulses ls 1"); |
543 for (var i = 0; i < execution_pauses.length; i++) { | 543 for (var i = 0; i < execution_pauses.length; i++) { |
544 var pause = execution_pauses[i]; | 544 var pause = execution_pauses[i]; |
545 output(pause.end + " " + pause.duration()); | 545 output(pause.end + " " + pause.duration()); |
546 obj_index++; | 546 obj_index++; |
547 } | 547 } |
548 output("e"); | 548 output("e"); |
549 return obj_index; | 549 return obj_index; |
550 }; | 550 }; |
551 } | 551 } |
OLD | NEW |