Home
last modified time | relevance | path

Searched refs:ContextNode (Results 1 – 9 of 9) sorted by relevance

/freebsd/contrib/llvm-project/compiler-rt/lib/ctx_profile/
H A DCtxInstrContextNode.h68 class ContextNode final {
70 ContextNode *const Next;
75 ContextNode(GUID Guid, uint32_t NumCounters, uint32_t NumCallsites,
76 ContextNode *Next = nullptr)
82 return sizeof(ContextNode) + sizeof(uint64_t) * NumCounters + in getAllocSize()
83 sizeof(ContextNode *) * NumCallsites; in getAllocSize()
88 ContextNode *addr_after = &(this[1]); in counters()
96 return const_cast<ContextNode *>(this)->counters(); in counters()
100 ContextNode **subContexts() { in subContexts()
101 return reinterpret_cast<ContextNode **>(&(counters()[NumCounters])); in subContexts()
[all …]
H A DCtxInstrProfiling.cpp59 ContextNode *markAsScratch(const ContextNode *Ctx) { in markAsScratch()
60 return reinterpret_cast<ContextNode *>(reinterpret_cast<uint64_t>(Ctx) | 1); in markAsScratch()
92 const auto *Ctx = reinterpret_cast<const ContextNode *>(Pos); in validate()
105 const auto *Ctx = reinterpret_cast<const ContextNode *>(Pos); in validate()
117 inline ContextNode *allocContextNode(char *Place, GUID Guid, in allocContextNode()
120 ContextNode *Next = nullptr) { in allocContextNode()
122 return new (Place) ContextNode(Guid, NumCounters, NumCallsites, Next); in allocContextNode()
125 void resetContextNode(ContextNode &Node) { in resetContextNode()
135 ContextNode *onContextEnter(ContextNode &Node) { in onContextEnter()
152 markAsScratch(reinterpret_cast<ContextNode *>(__Buffer))
[all …]
H A DCtxInstrProfiling.h75 static_assert(alignof(ContextNode) == ExpectedAlignment);
80 ContextNode *FirstNode = nullptr;
96 ::__sanitizer::DenseMap<GUID, ContextNode *> Unhandled;
99 ContextNode *FirstUnhandledCalleeNode = nullptr;
191 extern __thread ContextNode **volatile __llvm_ctx_profile_callsite[2];
200 ContextNode *
210 ContextNode *__llvm_ctx_profile_get_context(__ctx_profile::FunctionData *FData,
/freebsd/contrib/llvm-project/llvm/include/llvm/ProfileData/
H A DCtxInstrContextNode.h68 class ContextNode final {
70 ContextNode *const Next;
75 ContextNode(GUID Guid, uint32_t NumCounters, uint32_t NumCallsites,
76 ContextNode *Next = nullptr)
82 return sizeof(ContextNode) + sizeof(uint64_t) * NumCounters + in getAllocSize()
83 sizeof(ContextNode *) * NumCallsites; in getAllocSize()
88 ContextNode *addr_after = &(this[1]); in counters()
96 return const_cast<ContextNode *>(this)->counters(); in counters()
100 ContextNode **subContexts() { in subContexts()
101 return reinterpret_cast<ContextNode **>(&(counters()[NumCounters])); in subContexts()
[all …]
H A DPGOCtxProfWriter.h88 void writeNode(uint32_t CallerIndex, const ctx_profile::ContextNode &Node);
89 void writeSubcontexts(const ctx_profile::ContextNode &Node);
98 void writeContextual(const ctx_profile::ContextNode &RootNode,
99 const ctx_profile::ContextNode *Unhandled,
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DMemProfContextDisambiguation.cpp308 struct ContextNode { struct in __anonf01a58700111::CallsiteContextGraph
421 std::vector<ContextNode *> Clones; argument
424 ContextNode *CloneOf = nullptr; argument
426 ContextNode(bool IsAllocation) : IsAllocation(IsAllocation), Call() {} in ContextNode() argument
428 ContextNode(bool IsAllocation, CallInfo C) in ContextNode() function
431 void addClone(ContextNode *Clone) { in addClone() argument
442 ContextNode *getOrigNode() { in getOrigNode() argument
448 void addOrUpdateCallerEdge(ContextNode *Caller, AllocationType AllocType,
451 ContextEdge *findEdgeFromCallee(const ContextNode *Callee);
452 ContextEdge *findEdgeFromCaller(const ContextNode *Caller);
[all …]
H A DSampleContextTracker.cpp277 ContextTrieNode *ContextNode = getContextFor(DIL); in getContextSamplesFor() local
278 if (!ContextNode) in getContextSamplesFor()
287 FunctionSamples *Samples = ContextNode->getFunctionSamples(); in getContextSamplesFor()
288 if (Samples && ContextNode->getParentContext() != &RootContext) in getContextSamplesFor()
504 ContextTrieNode *ContextNode = &RootContext; in getContextFor() local
506 while (--I >= 0 && ContextNode) { in getContextFor()
509 ContextNode = ContextNode->getChildContext(CallSite, CalleeName); in getContextFor()
513 return ContextNode; in getContextFor()
521 ContextTrieNode *ContextNode = &RootContext; in getOrCreateContextPath() local
527 ContextNode = in getOrCreateContextPath()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/ProfileData/
H A DPGOCtxProfWriter.cpp105 const ContextNode &Node) { in writeNode()
118 void PGOCtxProfileWriter::writeSubcontexts(const ContextNode &Node) { in writeSubcontexts()
137 void PGOCtxProfileWriter::writeContextual(const ContextNode &RootNode, in writeContextual()
138 const ContextNode *Unhandled, in writeContextual()
188 ctx_profile::ContextNode *
194 ctx_profile::ContextNode *
197 ctx_profile::ContextNode *Next = nullptr) { in createNode()
198 auto AllocSize = ctx_profile::ContextNode::getAllocSize(DC.Counters.size(), in createNode()
202 auto *Ret = new (Mem) ctx_profile::ContextNode(DC.Guid, DC.Counters.size(), in createNode()
213 ctx_profile::ContextNode *
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/ctx_profile/tests/
H A DCtxInstrProfilingTest.cpp49 EXPECT_EQ(Ctx->size(), sizeof(ContextNode) + 10 * sizeof(uint64_t) + in TEST_F()
50 4 * sizeof(ContextNode *)); in TEST_F()
86 EXPECT_EQ(Subctx->size(), sizeof(ContextNode) + 3 * sizeof(uint64_t) + in TEST_F()
87 1 * sizeof(ContextNode *)); in TEST_F()
243 void writeContextual(const ContextNode &Node, const ContextNode *Unhandled, in TEST_F()