Lines Matching full:binary

24                                     cl::desc("Print binary load events."));
106 if (!isValidFallThroughRange(Target, End, Binary)) {
112 if (Binary->usePseudoProbes()) {
138 bool SameInlinee = Binary->inlineContextEqual(PrevIP, IP.Address);
155 uint64_t CallAddr = Binary->getCallAddrFromFrameAddr(LBR.Target);
172 KeyStr->Context = Binary->getExpandedContext(Stack, KeyStr->WasLeafInlined);
182 // the inlinings for the leaf frame(the profiled binary inlining),
223 T EmptyStack(Binary);
249 if (Binary->usePseudoProbes()) {
250 AddressStack Stack(Binary);
253 FrameStack Stack(Binary);
271 if (Binary->usePseudoProbes()) {
284 UnwindState State(Sample, Binary);
340 PerfReaderBase::create(ProfiledBinary *Binary, PerfInputFile &PerfInput,
346 new UnsymbolizedProfileReader(Binary, PerfInput.InputFile));
354 Binary, Binary->isKernel(), PerfInput, PIDFilter);
363 new HybridPerfReader(Binary, PerfInput.InputFile, PIDFilter));
365 PerfReader.reset(new LBRPerfReader(Binary, PerfInput.InputFile, PIDFilter));
374 PerfScriptReader::convertPerfDataToTrace(ProfiledBinary *Binary, bool SkipPID,
378 // Run perf script to retrieve PIDs matching binary we're interested in.
407 extractMMapEventForBinary(Binary, TraceIt.getCurrentLine(), MMap)) {
457 // Drop the event which doesn't belong to user-provided binary
458 StringRef BinaryName = filename(Event.BinaryPath, Binary->isCOFF());
459 bool IsKernel = Binary->isKernel();
460 if (!IsKernel && Binary->getName() != BinaryName)
462 if (IsKernel && !Binary->isKernelImageName(BinaryName))
470 if (Event.Address == Binary->getBaseAddress()) {
471 Binary->setIsLoadedByMMap(true);
475 if (IsKernel || Event.Offset == Binary->getTextSegmentOffset()) {
476 // A binary image could be unloaded and then reloaded at different
477 // place, so update binary load address.
481 Binary->setBaseAddress(Event.Address);
482 Binary->setIsLoadedByMMap(true);
485 const auto &Offsets = Binary->getTextSegmentOffsets();
490 const auto &PreferredAddrs = Binary->getPreferredTextSegmentAddresses();
491 if (PreferredAddrs[I] - Binary->getPreferredBaseAddress() !=
492 Event.Address - Binary->getBaseAddress())
502 if (Event.Offset - *It != Event.Address - Binary->getBaseAddress())
510 const ProfiledBinary *Binary) {
521 Address -= Binary->getFirstLoadableAddress();
523 Address -= Binary->getPreferredBaseAddress();
536 VirtualUnwinder Unwinder(&SampleCounters, Binary);
626 Src = Binary->canonicalizeVirtualAddress(Src);
627 Dst = Binary->canonicalizeVirtualAddress(Dst);
628 bool SrcIsInternal = Binary->addressIsCode(Src);
629 bool DstIsInternal = Binary->addressIsCode(Dst);
664 FrameAddr = Binary->canonicalizeVirtualAddress(FrameAddr);
666 if (!Binary->addressIsCode(FrameAddr)) {
680 auto CallAddr = Binary->getCallAddrFromFrameAddr(FrameAddr);
713 !Binary->addressInPrologEpilog(CallStack.front());
717 if (!Binary->getMissingMMapWarned() && !Binary->getIsLoadedByMMap()) {
719 << Binary->getName()
722 Binary->getPreferredBaseAddress())
725 Binary->setMissingMMapWarned(true);
786 OrderedCounters[getContextKeyStr(CI.first.getPtr(), Binary)] = &CI.second;
799 Start -= Binary->getFirstLoadableAddress();
800 End -= Binary->getFirstLoadableAddress();
802 Start -= Binary->getPreferredBaseAddress();
803 End -= Binary->getPreferredBaseAddress();
878 Source += Binary->getFirstLoadableAddress();
879 Target += Binary->getFirstLoadableAddress();
881 Source += Binary->getPreferredBaseAddress();
882 Target += Binary->getPreferredBaseAddress();
929 if (Binary->addressIsCode(TargetAddress)) {
936 if (Binary->addressIsCode(StartAddress) &&
937 Binary->addressIsCode(EndAddress) &&
938 isValidFallThroughRange(StartAddress, EndAddress, Binary))
984 bool PerfScriptReader::extractMMapEventForBinary(ProfiledBinary *Binary,
1006 // Field 5 - binary path
1040 outs() << "Mmap: Binary " << MMap.BinaryPath << " loaded at "
1044 StringRef BinaryName = filename(MMap.BinaryPath, Binary->isCOFF());
1045 if (Binary->isKernel()) {
1046 return Binary->isKernelImageName(BinaryName);
1048 return Binary->getName() == BinaryName;
1053 if (extractMMapEventForBinary(Binary, TraceIt.getCurrentLine(), MMap))
1196 "likely due to profile and binary mismatch.";
1201 "profile and binary mismatch.";
1215 if (!Binary->addressIsCode(StartAddress) &&
1216 !Binary->addressIsCode(EndAddress))
1219 if (!Binary->addressIsCode(StartAddress) ||
1220 !Binary->addressIsTransfer(EndAddress)) {
1225 auto *FRange = Binary->findFuncRange(StartAddress);
1237 if (Binary->addressIsCode(StartAddress) &&
1238 Binary->addressIsCode(EndAddress) &&
1239 !isValidFallThroughRange(StartAddress, EndAddress, Binary)) {
1263 if (Binary->isKernel() && !Binary->getIsLoadedByMMap()) {