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.
35 Profile.call(this);
37 this.skipThisFunction = function(name) { return V8Profile.IC_RE.test(name); };
74 LogReader.call(this, {
77 processor: this.processCodeCreation },
79 processor: this.processCodeMove },
81 processor: this.processCodeDelete },
87 processor: this.processSnapshotPosition }});
103 this.profile_ = new V8Profile();
104 this.serializedEntries_ = [];
114 this.profile_.addFuncCode(type, name, start, size, funcAddr, state);
116 this.profile_.addCode(type, name, start, size);
122 this.profile_.moveCode(from, to);
127 this.profile_.deleteCode(start);
132 this.serializedEntries_[pos] = this.profile_.findEntry(addr);
138 this.processLogChunk(contents);
143 var entry = this.serializedEntries_[pos];
155 LogReader.call(this, {
157 processor: this.processSharedLibrary },
160 processor: this.processCodeCreation },
162 processor: this.processCodeMove },
164 processor: this.processCodeDelete },
166 processor: this.processFunctionMove },
168 processor: this.processSnapshotPosition },
172 processor: this.processTick },
174 processor: this.processHeapSampleBegin },
176 processor: this.processHeapSampleEnd },
188 this.cppEntriesProvider_ = cppEntriesProvider;
189 this.callGraphSize_ = callGraphSize;
190 this.ignoreUnknown_ = ignoreUnknown;
191 this.stateFilter_ = stateFilter;
192 this.snapshotLogProcessor_ = snapshotLogProcessor;
193 this.deserializedEntriesNames_ = [];
194 var ticks = this.ticks_ =
209 // otherwise tick balance will be corrupted (this behavior is compatible
218 this.profile_ = new V8Profile(separateIc);
219 this.codeTypes_ = {};
221 this.viewBuilder_ = new ViewBuilder(1);
222 this.lastLogFileName_ = null;
224 this.generation_ = 1;
225 this.currentProducerProfile_ = null;
243 // Otherwise, this is JS-related code. We are not adding it to
260 this.codeTypes_[name] = TickProcessor.CodeTypes[type];
265 return this.codeTypes_[name] == TickProcessor.CodeTypes.SHARED_LIB;
270 return this.codeTypes_[name] == TickProcessor.CodeTypes.CPP;
275 return !(name in this.codeTypes_);
280 this.lastLogFileName_ = fileName;
283 this.processLogLine(line);
290 this.lastLogFileName_ = 'v8.log';
292 this.processLogChunk(contents);
298 var entry = this.profile_.addLibrary(name, startAddr, endAddr);
299 this.setCodeType(entry.getName(), 'SHARED_LIB');
301 var self = this;
302 var libFuncs = this.cppEntriesProvider_.parseVmSymbols(
312 name = this.deserializedEntriesNames_[start] || name;
316 this.profile_.addFuncCode(type, name, start, size, funcAddr, state);
318 this.profile_.addCode(type, name, start, size);
324 this.profile_.moveCode(from, to);
329 this.profile_.deleteCode(start);
334 this.profile_.moveFunc(from, to);
339 if (this.snapshotLogProcessor_) {
340 this.deserializedEntriesNames_[addr] =
341 this.snapshotLogProcessor_.getSerializedEntryName(pos);
347 return this.stateFilter_ == null || this.stateFilter_ == vmState;
356 this.ticks_.total++;
357 if (vmState == TickProcessor.VmStates.GC) this.ticks_.gc++;
358 if (!this.includeTick(vmState)) {
359 this.ticks_.excluded++;
372 var funcEntry = this.profile_.findEntry(tos_or_external_callback);
378 this.profile_.recordTick(this.processStack(pc, tos_or_external_callback, stack));
384 this.currentProducerProfile_ = new CallTree();
389 if (space != 'Heap' || !this.currentProducerProfile_) return;
391 print('Generation ' + this.generation_ + ':');
392 var tree = this.currentProducerProfile_;
394 var producersView = this.viewBuilder_.buildView(tree);
399 this.printHeavyProfile(producersView.head.children);
401 this.currentProducerProfile_ = null;
402 this.generation_++;
407 print('Statistical profiling result from ' + this.lastLogFileName_ +
408 ', (' + this.ticks_.total +
409 ' ticks, ' + this.ticks_.unaccounted + ' unaccounted, ' +
410 this.ticks_.excluded + ' excluded).');
412 if (this.ticks_.total == 0) return;
415 if (!this.ignoreUnknown_ && this.ticks_.unaccounted > 0) {
416 this.printHeader('Unknown');
417 this.printCounter(this.ticks_.unaccounted, this.ticks_.total);
420 var flatProfile = this.profile_.getFlatProfile();
421 var flatView = this.viewBuilder_.buildView(flatProfile);
426 var totalTicks = this.ticks_.total;
427 if (this.ignoreUnknown_) {
428 totalTicks -= this.ticks_.unaccounted;
436 var self = this;
438 this.processProfile(flatViewNodes,
443 this.printHeader('Shared libraries');
444 this.printEntries(flatViewNodes, null,
447 this.printHeader('JavaScript');
448 this.printEntries(flatViewNodes, nonLibraryTicks,
451 this.printHeader('C++');
452 this.printEntries(flatViewNodes, nonLibraryTicks,
455 this.printHeader('GC');
456 this.printCounter(this.ticks_.gc, totalTicks);
458 this.printHeavyProfHeader();
459 var heavyProfile = this.profile_.getBottomUpProfile();
460 var heavyView = this.viewBuilder_.buildView(heavyProfile);
467 this.printHeavyProfile(heavyView.head.children);
522 this.processProfile(profile, filterP, function (rec) {
535 var self = this;
538 this.processProfile(profile, function() { return true; }, function (rec) {
562 this.loadSymbols(libName);
584 var funcInfo = this.parseNextLine();
612 this.symbols = [];
613 this.parsePos = 0;
614 this.nmExec = nmExec;
615 this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ([0-9a-fA-F]{8,16} )?[tTwW] (.*)$/;
621 this.parsePos = 0;
623 this.symbols = [
624 os.system(this.nmExec, ['-C', '-n', '-S', libName], -1, -1),
625 os.system(this.nmExec, ['-C', '-n', '-S', '-D', libName], -1, -1)
628 // If the library cannot be found on this system let's not panic.
629 this.symbols = ['', ''];
635 if (this.symbols.length == 0) {
638 var lineEndPos = this.symbols[0].indexOf('\n', this.parsePos);
640 this.symbols.shift();
641 this.parsePos = 0;
642 return this.parseNextLine();
645 var line = this.symbols[0].substring(this.parsePos, lineEndPos);
646 this.parsePos = lineEndPos + 1;
647 var fields = line.match(this.FUNC_RE);
660 UnixCppEntriesProvider.call(this, nmExec);
662 this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ()[iItT] (.*)$/;
668 this.parsePos = 0;
670 this.symbols = [os.system(this.nmExec, ['-n', '-f', libName], -1, -1), ''];
672 // If the library cannot be found on this system let's not panic.
673 this.symbols = '';
679 this.symbols = '';
680 this.parsePos = 0;
704 this.moduleType_ = fileNameFields[2].toLowerCase();
706 this.symbols = read(mapFileName);
709 this.symbols = '';
715 var lineEndPos = this.symbols.indexOf('\r\n', this.parsePos);
720 var line = this.symbols.substring(this.parsePos, lineEndPos);
721 this.parsePos = lineEndPos + 2;
728 if ((this.moduleType_ == 'exe') !=
736 { name: this.unmangleName(fields[1]), start: parseInt(fields[2], 16) } :
760 this.args_ = args;
761 this.result_ = ArgumentsProcessor.DEFAULTS;
763 this.argsDispatch_ = {
791 this.argsDispatch_['--js'] = this.argsDispatch_['-j'];
792 this.argsDispatch_['--gc'] = this.argsDispatch_['-g'];
793 this.argsDispatch_['--compiler'] = this.argsDispatch_['-c'];
794 this.argsDispatch_['--other'] = this.argsDispatch_['-o'];
795 this.argsDispatch_['--external'] = this.argsDispatch_['-e'];
812 while (this.args_.length) {
813 var arg = this.args_[0];
817 this.args_.shift();
824 if (arg in this.argsDispatch_) {
825 var dispatch = this.argsDispatch_[arg];
826 this.result_[dispatch[0]] = userValue == null ? dispatch[1] : userValue;
832 if (this.args_.length >= 1) {
833 this.result_.logFileName = this.args_.shift();
840 return this.result_;
858 for (var arg in this.argsDispatch_) {
860 var dispatch = this.argsDispatch_[arg];
861 for (var synArg in this.argsDispatch_) {
862 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) {
864 delete this.argsDispatch_[synArg];