Lines Matching defs:this

7 //       notice, this list of conditions and the following disclaimer.
9 // copyright notice, this list of conditions and the following
14 // from this software without specific prior written permission.
61 this.profile = new devtools.profiler.Profile();
62 this.stack_ = [];
63 this.addFunctions_();
75 this.profile.addLibrary('lib1', 0x11000, 0x12000);
76 this.profile.addStaticCode('lib1-f1', 0x11100, 0x11900);
77 this.profile.addStaticCode('lib1-f2', 0x11200, 0x11500);
78 this.profile.addLibrary('lib2', 0x21000, 0x22000);
79 this.profile.addStaticCode('lib2-f1', 0x21100, 0x21900);
80 this.profile.addStaticCode('lib2-f2', 0x21200, 0x21500);
81 this.profile.addCode('T', 'F1', 0x50100, 0x100);
82 this.profile.addCode('T', 'F2', 0x50200, 0x100);
83 this.profile.addCode('T', 'F3', 0x50400, 0x100);
88 // Stack looks like this: [pc, caller, ..., main].
90 this.stack_.unshift(this.funcAddrs_[funcName]);
91 this.profile.recordTick(this.stack_);
96 this.profile.recordTick(this.stack_);
101 this.stack_.shift();
106 this.enter('lib1-f1');
107 this.enter('lib1-f2');
108 this.enter('T: F1');
109 this.enter('T: F2');
110 this.leave();
111 this.stay();
112 this.enter('lib2-f1');
113 this.enter('lib2-f1');
114 this.leave();
115 this.stay();
116 this.leave();
117 this.enter('T: F3');
118 this.enter('T: F3');
119 this.enter('T: F3');
120 this.leave();
121 this.enter('T: F2');
122 this.stay();
123 this.leave();
124 this.leave();
125 this.leave();
126 this.leave();
127 this.enter('lib2-f1');
128 this.enter('lib1-f1');
129 this.leave();
130 this.leave();
131 this.stay();
132 this.leave();
147 ProfileTestDriver.call(this);
148 this.namesTopDown = [];
149 this.namesBottomUp = [];
154 this.namesTopDown.push(func);
155 this.namesBottomUp.unshift(func);
156 assertNoPathExists(this.profile.getTopDownProfile().getRoot(), this.namesTopDown,
158 assertNoPathExists(this.profile.getBottomUpProfile().getRoot(), this.namesBottomUp,
160 Driver.superClass_.enter.call(this, func);
161 assertPathExists(this.profile.getTopDownProfile().getRoot(), this.namesTopDown,
163 assertPathExists(this.profile.getBottomUpProfile().getRoot(), this.namesBottomUp,
168 var preTopDownNodes = countNodes(this.profile, this.profile.traverseTopDownTree);
169 var preBottomUpNodes = countNodes(this.profile, this.profile.traverseBottomUpTree);
170 Driver.superClass_.stay.call(this);
171 var postTopDownNodes = countNodes(this.profile, this.profile.traverseTopDownTree);
172 var postBottomUpNodes = countNodes(this.profile, this.profile.traverseBottomUpTree);
179 Driver.superClass_.leave.call(this);
180 this.namesTopDown.pop();
181 this.namesBottomUp.shift();
227 ProfileTestDriver.call(this);
228 this.namesTopDown = [''];
229 this.counters = {};
230 this.root = null;
235 if (!(func in this.counters)) {
236 this.counters[func] = { self: 0, total: 0 };
238 this.counters[func].self += self;
239 this.counters[func].total += total;
245 for (var i = 0; i < this.namesTopDown.length; ++i) {
246 var name = this.namesTopDown[i];
248 this.increment(name, 0, 1);
255 Driver.superClass_.enter.call(this, func);
256 this.namesTopDown.push(func);
257 this.increment(func, 1, 0);
258 this.incrementTotals();
262 Driver.superClass_.stay.call(this);
263 this.increment(this.namesTopDown[this.namesTopDown.length - 1], 1, 0);
264 this.incrementTotals();
268 Driver.superClass_.leave.call(this);
269 this.namesTopDown.pop();
273 assertTrue('' in this.counters);
274 this.root = this.counters[''];
275 delete this.counters[''];