| /freebsd/contrib/llvm-project/compiler-rt/lib/xray/ |
| H A D | xray_interface.cpp | 169 bool patchSled(const XRaySledEntry &Sled, bool Enable, int32_t FuncId, in patchSled() argument 174 Success = patchFunctionEntry(Enable, FuncId, Sled, Trampolines, in patchSled() 178 Success = patchFunctionExit(Enable, FuncId, Sled, Trampolines); in patchSled() 181 Success = patchFunctionTailExit(Enable, FuncId, Sled, Trampolines); in patchSled() 184 Success = patchFunctionEntry(Enable, FuncId, Sled, Trampolines, in patchSled() 188 Success = patchCustomEvent(Enable, FuncId, Sled); in patchSled() 191 Success = patchTypedEvent(Enable, FuncId, Sled); in patchSled() 202 findFunctionSleds(int32_t FuncId, in findFunctionSleds() argument 208 for (std::size_t I = 0; I < InstrMap.Entries && CurFn <= FuncId; I++) { in findFunctionSleds() 216 if (CurFn == FuncId) { in findFunctionSleds() [all …]
|
| H A D | xray_powerpc64.cpp | 52 bool patchFunctionEntry(const bool Enable, uint32_t FuncId, in patchFunctionEntry() argument 65 (0x3c000000ull + (FuncId >> 16)) + in patchFunctionEntry() 66 ((0x60000000ull + (FuncId & 0xffff)) << 32); in patchFunctionEntry() 77 const bool Enable, uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 88 (0x3c000000ull + (FuncId >> 16)) + in patchFunctionExit() 89 ((0x60000000ull + (FuncId & 0xffff)) << 32); in patchFunctionExit() 100 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 102 return patchFunctionExit(Enable, FuncId, Sled, Trampolines); in patchFunctionTailExit() 108 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument 114 bool patchTypedEvent(const bool Enable, const uint32_t FuncId, in patchTypedEvent() argument
|
| H A D | xray_hexagon.cpp | 87 inline static bool patchSled(const bool Enable, const uint32_t FuncId, in patchSled() argument 119 *CurAddress = encodeExtendedTransferImmediate(FuncId, RN_R7); in patchSled() 129 WriteInstFlushCache(FirstAddress, uint32_t(encodeConstantExtender(FuncId))); in patchSled() 136 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 142 return patchSled(Enable, FuncId, Sled, Trampoline); in patchFunctionEntry() 146 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 148 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionExit() 152 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 154 return patchSled(Enable, FuncId, Sled, Trampolines.TailExitTrampoline); in patchFunctionTailExit() 157 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument [all …]
|
| H A D | xray_s390x.cpp | 20 bool __xray::patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 37 Address[2] = FuncId; in patchFunctionEntry() 50 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 65 Address[2] = FuncId; in patchFunctionExit() 78 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 80 return patchFunctionExit(Enable, FuncId, Sled, Trampolines); in patchFunctionTailExit() 83 bool __xray::patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument 89 bool __xray::patchTypedEvent(const bool Enable, const uint32_t FuncId, in patchTypedEvent() argument
|
| H A D | xray_AArch64.cpp | 33 inline static bool patchSled(const bool Enable, const uint32_t FuncId, in patchSled() argument 71 *CurAddress = FuncId; in patchSled() 90 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 96 return patchSled(Enable, FuncId, Sled, Trampoline); in patchFunctionEntry() 100 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 102 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionExit() 106 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 108 return patchSled(Enable, FuncId, Sled, Trampolines.TailExitTrampoline); in patchFunctionTailExit() 125 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument 136 bool patchTypedEvent(const bool Enable, const uint32_t FuncId, in patchTypedEvent() argument
|
| H A D | xray_loongarch64.cpp | 43 static inline bool patchSled(const bool Enable, const uint32_t FuncId, in patchSled() argument 86 uint32_t LoFunctionID = FuncId & 0xfff; in patchSled() 87 uint32_t HiFunctionID = (FuncId >> 12) & 0xfffff; in patchSled() 127 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 133 return patchSled(Enable, FuncId, Sled, Trampoline); in patchFunctionEntry() 137 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 139 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionExit() 143 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 147 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionTailExit() 150 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument [all …]
|
| H A D | xray_arm.cpp | 76 inline static bool patchSled(const bool Enable, const uint32_t FuncId, in patchSled() argument 109 write32bitLoadR0(CurAddress, reinterpret_cast<uint32_t>(FuncId)); in patchSled() 129 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 135 return patchSled(Enable, FuncId, Sled, Trampoline); in patchFunctionEntry() 139 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 141 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionExit() 145 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 147 return patchSled(Enable, FuncId, Sled, Trampolines.TailExitTrampoline); in patchFunctionTailExit() 150 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument 156 bool patchTypedEvent(const bool Enable, const uint32_t FuncId, in patchTypedEvent() argument
|
| H A D | xray_mips.cpp | 52 inline static bool patchSled(const bool Enable, const uint32_t FuncId, in patchSled() argument 102 uint32_t LoFunctionID = FuncId & 0xffff; in patchSled() 103 uint32_t HiFunctionID = (FuncId >> 16) & 0xffff; in patchSled() 137 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 143 return patchSled(Enable, FuncId, Sled, Trampoline); in patchFunctionEntry() 147 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 149 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionExit() 153 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 157 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionTailExit() 160 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument [all …]
|
| H A D | xray_mips64.cpp | 53 inline static bool patchSled(const bool Enable, const uint32_t FuncId, in patchSled() argument 102 uint32_t LoFunctionID = FuncId & 0xffff; in patchSled() 103 uint32_t HiFunctionID = (FuncId >> 16) & 0xffff; in patchSled() 145 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 151 return patchSled(Enable, FuncId, Sled, Trampoline); in patchFunctionEntry() 155 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 157 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionExit() 161 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 165 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionTailExit() 168 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument [all …]
|
| H A D | xray_basic_logging.cpp | 48 int32_t FuncId; member 158 void InMemoryRawLog(int32_t FuncId, XRayEntryType Type, in InMemoryRawLog() argument 185 E.FuncId = FuncId; in InMemoryRawLog() 216 if (StackTop.FuncId == FuncId && StackTop.CPU == CPU && in InMemoryRawLog() 242 R.FuncId = FuncId; in InMemoryRawLog() 255 void InMemoryRawLogWithArg(int32_t FuncId, XRayEntryType Type, uint64_t Arg1, in InMemoryRawLogWithArg() argument 277 InMemoryRawLog(FuncId, Type, ReadTSC); in InMemoryRawLogWithArg() 286 R.FuncId = FuncId; in InMemoryRawLogWithArg() 300 void basicLoggingHandleArg0RealTSC(int32_t FuncId, in basicLoggingHandleArg0RealTSC() argument 302 InMemoryRawLog(FuncId, Type, readTSC); in basicLoggingHandleArg0RealTSC() [all …]
|
| H A D | xray_fdr_controller.h | 51 constexpr int32_t mask(int32_t FuncId) const XRAY_NEVER_INSTRUMENT { in mask() argument 52 return FuncId & ((1 << 29) - 1); in mask() 181 bool rewindRecords(int32_t FuncId, uint64_t TSC, in rewindRecords() argument 198 DCHECK_EQ(F.FuncId, FuncId & ~(0x0F << 28)); in rewindRecords() 244 bool functionEnter(int32_t FuncId, uint64_t TSC, in functionEnter() argument 265 mask(FuncId), Delta); in functionEnter() 268 bool functionTailExit(int32_t FuncId, uint64_t TSC, in functionTailExit() argument 283 return rewindRecords(FuncId, TSC, CPU); in functionTailExit() 290 mask(FuncId), Delta); in functionTailExit() 293 bool functionEnterArg(int32_t FuncId, uint64_t TSC, uint16_t CPU, in functionEnterArg() argument [all …]
|
| H A D | xray_riscv.cpp | 79 static inline bool patchSled(const bool Enable, const uint32_t FuncId, in patchSled() argument 149 uint32_t LoFunctionID = lo12(FuncId); in patchSled() 150 uint32_t HiFunctionID = hi20(FuncId); in patchSled() 234 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 240 return patchSled(Enable, FuncId, Sled, Trampolines.EntryTrampoline); in patchFunctionEntry() 244 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 246 return patchSled(Enable, FuncId, Sled, Trampolines.ExitTrampoline); in patchFunctionExit() 250 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 252 return patchSled(Enable, FuncId, Sled, Trampolines.TailExitTrampoline); in patchFunctionTailExit() 255 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument [all …]
|
| H A D | xray_basic_logging.h | 31 void basicLoggingHandleArg0RealTSC(int32_t FuncId, XRayEntryType Entry); 32 void basicLoggingHandleArg0EmulateTSC(int32_t FuncId, XRayEntryType Entry); 33 void basicLoggingHandleArg1RealTSC(int32_t FuncId, XRayEntryType Entry, 35 void basicLoggingHandleArg1EmulateTSC(int32_t FuncId, XRayEntryType Entry,
|
| H A D | xray_x86_64.cpp | 123 bool patchFunctionEntry(const bool Enable, const uint32_t FuncId, in patchFunctionEntry() argument 160 *reinterpret_cast<uint32_t *>(Address + 2) = FuncId; in patchFunctionEntry() 176 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionExit() argument 209 *reinterpret_cast<uint32_t *>(Address + 2) = FuncId; in patchFunctionExit() 225 const bool Enable, const uint32_t FuncId, const XRaySledEntry &Sled, in patchFunctionTailExit() argument 240 *reinterpret_cast<uint32_t *>(Address + 2) = FuncId; in patchFunctionTailExit() 255 bool patchCustomEvent(const bool Enable, const uint32_t FuncId, in patchCustomEvent() argument 283 bool patchTypedEvent(const bool Enable, const uint32_t FuncId, in patchTypedEvent() argument
|
| H A D | xray_interface_internal.h | 142 bool patchFunctionEntry(bool Enable, uint32_t FuncId, const XRaySledEntry &Sled, 144 bool patchFunctionExit(bool Enable, uint32_t FuncId, const XRaySledEntry &Sled, 146 bool patchFunctionTailExit(bool Enable, uint32_t FuncId, 149 bool patchCustomEvent(bool Enable, uint32_t FuncId, const XRaySledEntry &Sled); 150 bool patchTypedEvent(bool Enable, uint32_t FuncId, const XRaySledEntry &Sled);
|
| /freebsd/contrib/llvm-project/llvm/tools/llvm-xray/ |
| H A D | xray-converter.cpp | 94 Trace.Records.push_back({R.RecordType, R.CPU, R.Type, R.FuncId, in exportAsYAML() 95 Symbolize ? FuncIdHelper.SymbolOrNumber(R.FuncId) in exportAsYAML() 96 : llvm::to_string(R.FuncId), in exportAsYAML() 151 Writer.write(R.FuncId); in exportAsRAWv1() 197 if (node_iter->FuncId == FnId) in findSiblings() 206 if (node_iter->FuncId == FnId) in findSiblings() 217 StackTrieNode *Parent, int32_t FuncId, uint32_t TId, in findOrCreateStackNode() argument 223 auto match = find_if(ParentCallees, [FuncId](StackTrieNode *ParentCallee) { in findOrCreateStackNode() 224 return FuncId == ParentCallee->FuncId; in findOrCreateStackNode() 247 writeTraceViewerRecord(uint16_t Version,raw_ostream & OS,int32_t FuncId,uint32_t TId,uint32_t PId,bool Symbolize,const FuncIdConversionHelper & FuncIdHelper,double EventTimestampUs,const StackTrieNode & StackCursor,StringRef FunctionPhenotype) writeTraceViewerRecord() argument [all...] |
| H A D | func-id-helper.cpp | 21 std::string FuncIdConversionHelper::SymbolOrNumber(int32_t FuncId) const { in SymbolOrNumber() 22 auto CacheIt = CachedNames.find(FuncId); in SymbolOrNumber() 27 auto It = FunctionAddresses.find(FuncId); in SymbolOrNumber() 29 F << "#" << FuncId; in SymbolOrNumber() 50 CachedNames[FuncId] = S; in SymbolOrNumber() 54 std::string FuncIdConversionHelper::FileLineAndColumn(int32_t FuncId) const { in FileLineAndColumn() 55 auto It = FunctionAddresses.find(FuncId); in FileLineAndColumn()
|
| H A D | trie-node.h | 32 int32_t FuncId; member 56 assert(Left.FuncId == Right.FuncId); in mergeTrieNodes() 58 Left.FuncId, NewParent, {}, MergeFn(Left.ExtraData, Right.ExtraData)}); in mergeTrieNodes() 65 LeftCalleesByFuncId[Callee->FuncId] = Callee; in mergeTrieNodes() 73 auto iter = LeftCalleesByFuncId.find(Callee->FuncId); in mergeTrieNodes()
|
| H A D | xray-stacks.cpp | 119 Converter->SymbolOrNumber(Item.FuncId), Item.TId, in format() 328 StackTrieNode *createTrieNode(uint32_t ThreadId, int32_t FuncId, in createTrieNode() argument 330 NodeStore.push_front(StackTrieNode{FuncId, Parent, {}, {{}, {}}}); in createTrieNode() 338 StackTrieNode *findRootNode(uint32_t ThreadId, int32_t FuncId) { in findRootNode() argument 341 [&](StackTrieNode *N) { return N->FuncId == FuncId; }); in findRootNode() 374 auto *Root = findRootNode(R.TId, R.FuncId); in accountRecord() 375 TS.emplace_back(Root ? Root : createTrieNode(R.TId, R.FuncId, nullptr), in accountRecord() 382 [&](StackTrieNode *N) { return N->FuncId == R.FuncId; }); in accountRecord() 386 auto N = createTrieNode(R.TId, R.FuncId, Top.first); in accountRecord() 415 return E.first->FuncId == R.FuncId; in accountRecord() [all …]
|
| H A D | xray-graph.cpp | 224 if (Record.FuncId != 0 && G.count(Record.FuncId) == 0) in accountRecord() 225 G[Record.FuncId].SymbolName = FuncIdHelper.SymbolOrNumber(Record.FuncId); in accountRecord() 226 ThreadStack.push_back({Record.FuncId, Record.TSC}); in accountRecord() 233 if (ThreadStack.size() == 0 || ThreadStack.back().FuncId != Record.FuncId) { in accountRecord() 239 return A.FuncId == Record.FuncId; in accountRecord() 246 while (ThreadStack.back().FuncId != Record.FuncId) { in accountRecord() 248 VertexIdentifier TopFuncId = ThreadStack.back().FuncId; in accountRecord() 251 EdgeIdentifier EI(ThreadStack.back().FuncId, TopFuncId); in accountRecord() 260 VertexIdentifier VI = ThreadStack.empty() ? 0 : ThreadStack.back().FuncId; in accountRecord() 261 EdgeIdentifier EI(VI, Record.FuncId); in accountRecord() [all …]
|
| H A D | xray-account.cpp | 180 ThreadStack.Stack.emplace_back(Record.FuncId, Record.TSC); in accountRecord() 182 ++(*ThreadStack.RecursionDepth)[Record.FuncId]; in accountRecord() 190 if (ThreadStack.Stack.back().first == Record.FuncId) { in accountRecord() 208 return E.first == Record.FuncId; in accountRecord() 316 const auto &FuncId = FT.first; in exportStats() local 318 Results.emplace_back(FuncId, Timings.size(), getStats(Timings)); in exportStats() 330 Row.Function = FuncIdHelper.SymbolOrNumber(FuncId); in exportStats() 331 Row.DebugInfo = FuncIdHelper.FileLineAndColumn(FuncId); in exportStats() 403 exportStats(Header, [&](int32_t FuncId, size_t Count, const ResultRow &Row) { in exportStatsAsText() argument 404 OS << llvm::formatv(StatsFormat, FuncId, Count, Row.Min, Row.Median, in exportStatsAsText() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/include/xray/ |
| H A D | xray_interface.h | 115 extern XRayPatchingStatus __xray_patch_function(int32_t FuncId); 119 extern XRayPatchingStatus __xray_patch_function_in_object(int32_t FuncId, 125 extern XRayPatchingStatus __xray_unpatch_function(int32_t FuncId); 129 extern XRayPatchingStatus __xray_unpatch_function_in_object(int32_t FuncId, 135 extern uintptr_t __xray_function_address(int32_t FuncId); 140 extern uintptr_t __xray_function_address_in_object(int32_t FuncId, 166 extern int32_t __xray_pack_id(int32_t FuncId, int32_t ObjId);
|
| /freebsd/contrib/llvm-project/llvm/lib/MC/ |
| H A D | MCCodeView.cpp | 74 MCCVFunctionInfo *CodeViewContext::getCVFunctionInfo(unsigned FuncId) { in getCVFunctionInfo() argument 75 if (FuncId >= Functions.size()) in getCVFunctionInfo() 77 if (Functions[FuncId].isUnallocatedFunctionInfo()) in getCVFunctionInfo() 79 return &Functions[FuncId]; in getCVFunctionInfo() 82 bool CodeViewContext::recordFunctionId(unsigned FuncId) { in recordFunctionId() argument 83 if (FuncId >= Functions.size()) in recordFunctionId() 84 Functions.resize(FuncId + 1); in recordFunctionId() 87 if (!Functions[FuncId].isUnallocatedFunctionInfo()) in recordFunctionId() 91 Functions[FuncId].ParentFuncIdPlusOne = MCCVFunctionInfo::FunctionSentinel; in recordFunctionId() 95 bool CodeViewContext::recordInlinedCallSiteId(unsigned FuncId, unsigned IAFunc, in recordInlinedCallSiteId() argument [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/MC/ |
| H A D | MCCodeView.h | 160 bool recordFunctionId(unsigned FuncId); 166 bool recordInlinedCallSiteId(unsigned FuncId, unsigned IAFunc, 171 MCCVFunctionInfo *getCVFunctionInfo(unsigned FuncId); 184 std::vector<MCCVLoc> getFunctionLineEntries(unsigned FuncId); 186 std::pair<size_t, size_t> getLineExtent(unsigned FuncId); 187 std::pair<size_t, size_t> getLineExtentIncludingInlinees(unsigned FuncId); 192 void emitLineTableForFunction(MCObjectStreamer &OS, unsigned FuncId,
|
| /freebsd/contrib/llvm-project/llvm/lib/XRay/ |
| H A D | InstrumentationMap.cpp | 43 InstrumentationMap::getFunctionAddr(int32_t FuncId) const { in getFunctionAddr() 44 auto I = FunctionAddresses.find(FuncId); in getFunctionAddr() 167 int32_t FuncId = 1; in loadObj() local 208 FunctionAddresses[FuncId] = Entry.Function; in loadObj() 209 FunctionIds[Entry.Function] = FuncId; in loadObj() 212 ++FuncId; in loadObj() 214 FunctionAddresses[FuncId] = Entry.Function; in loadObj() 215 FunctionIds[Entry.Function] = FuncId; in loadObj() 244 FunctionAddresses[Y.FuncId] = Y.Function; in loadYAML() 245 FunctionIds[Y.Function] = Y.FuncId; in loadYAML()
|