| Index: tools/tickprocessor.js
|
| ===================================================================
|
| --- tools/tickprocessor.js (revision 12764)
|
| +++ tools/tickprocessor.js (working copy)
|
| @@ -185,6 +185,7 @@
|
| 'begin-code-region': null,
|
| 'end-code-region': null });
|
|
|
| + this.timeline_ = "";
|
| this.cppEntriesProvider_ = cppEntriesProvider;
|
| this.callGraphSize_ = callGraphSize;
|
| this.ignoreUnknown_ = ignoreUnknown;
|
| @@ -347,6 +348,16 @@
|
| return this.stateFilter_ == null || this.stateFilter_ == vmState;
|
| };
|
|
|
| +TickProcessor.prototype.recordTickTimeline = function(vmState) {
|
| + if (vmState == TickProcessor.VmStates.JS) this.timeline_ += "J";
|
| + else if (vmState == TickProcessor.VmStates.GC) this.timeline_ += "G";
|
| + else if (vmState == TickProcessor.VmStates.COMPILER) this.timeline_ += "C";
|
| + else if (vmState == TickProcessor.VmStates.PARALLEL_COMPILER_PROLOGUE) this.timeline_ += "|";
|
| + else if (vmState == TickProcessor.VmStates.OTHER) this.timeline_ += "O";
|
| + else if (vmState == TickProcessor.VmStates.EXTERNAL) this.timeline_ += ".";
|
| + else this.timeline_ += "U";
|
| +}
|
| +
|
| TickProcessor.prototype.processTick = function(pc,
|
| sp,
|
| is_external_callback,
|
| @@ -354,6 +365,7 @@
|
| vmState,
|
| stack) {
|
| this.ticks_.total++;
|
| + this.recordTickTimeline(vmState);
|
| if (vmState == TickProcessor.VmStates.GC) this.ticks_.gc++;
|
| if (!this.includeTick(vmState)) {
|
| this.ticks_.excluded++;
|
| @@ -465,6 +477,14 @@
|
| return rec2.totalTime - rec1.totalTime ||
|
| (rec2.internalFuncName < rec1.internalFuncName ? -1 : 1); });
|
| this.printHeavyProfile(heavyView.head.children);
|
| +
|
| + print('Visual Execution Timeline: ');
|
| + var sliceLength = 80;
|
| + var sliceStart = 0;
|
| + while (sliceStart < this.timeline_.length) {
|
| + print(this.timeline_.slice(sliceStart, sliceStart + sliceLength));
|
| + sliceStart += sliceLength;
|
| + }
|
| };
|
|
|
|
|
|
|