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 NrCounters, uint32_t NrCallsites,
76 ContextNode *Next = nullptr)
81 return sizeof(ContextNode) + sizeof(uint64_t) * NrCounters + in getAllocSize()
82 sizeof(ContextNode *) * NrCallsites; in getAllocSize()
87 ContextNode *addr_after = &(this[1]); in counters()
95 return const_cast<ContextNode *>(this)->counters(); in counters()
99 ContextNode **subContexts() { in subContexts()
100 return reinterpret_cast<ContextNode **>(&(counters()[NrCounters])); in subContexts()
[all …]
H A DCtxInstrProfiling.cpp36 ContextNode *markAsScratch(const ContextNode *Ctx) { in markAsScratch()
37 return reinterpret_cast<ContextNode *>(reinterpret_cast<uint64_t>(Ctx) | 1); in markAsScratch()
69 const auto *Ctx = reinterpret_cast<const ContextNode *>(Pos); in validate()
82 const auto *Ctx = reinterpret_cast<const ContextNode *>(Pos); in validate()
94 inline ContextNode *allocContextNode(char *Place, GUID Guid, in allocContextNode()
96 ContextNode *Next = nullptr) { in allocContextNode()
98 return new (Place) ContextNode(Guid, NrCounters, NrCallsites, Next); in allocContextNode()
101 void resetContextNode(ContextNode &Node) { in resetContextNode()
111 void onContextEnter(ContextNode &Node) { ++Node.counters()[0]; } in onContextEnter()
125 markAsScratch(reinterpret_cast<ContextNode *>(__Buffer))
[all …]
H A DCtxInstrProfiling.h74 static_assert(alignof(ContextNode) == ExpectedAlignment);
80 ContextNode *FirstNode = nullptr;
136 extern __thread ContextNode **volatile __llvm_ctx_profile_callsite[2];
145 ContextNode *__llvm_ctx_profile_start_context(__ctx_profile::ContextRoot *Root,
155 ContextNode *__llvm_ctx_profile_get_context(void *Callee, GUID Guid,
173 bool (*Writer)(void *, const ContextNode &));
/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 NrCounters, uint32_t NrCallsites,
76 ContextNode *Next = nullptr)
81 return sizeof(ContextNode) + sizeof(uint64_t) * NrCounters + in getAllocSize()
82 sizeof(ContextNode *) * NrCallsites; in getAllocSize()
87 ContextNode *addr_after = &(this[1]); in counters()
95 return const_cast<ContextNode *>(this)->counters(); in counters()
99 ContextNode **subContexts() { in subContexts()
100 return reinterpret_cast<ContextNode **>(&(counters()[NrCounters])); in subContexts()
[all …]
H A DPGOCtxProfWriter.h65 void writeCounters(const ctx_profile::ContextNode &Node);
67 const ctx_profile::ContextNode &Node);
82 void write(const ctx_profile::ContextNode &);
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DMemProfContextDisambiguation.cpp235 struct ContextNode { struct in __anonf01a58700111::CallsiteContextGraph
335 std::vector<ContextNode *> Clones; argument
338 ContextNode *CloneOf = nullptr; argument
340 ContextNode(bool IsAllocation) : IsAllocation(IsAllocation), Call() {} in ContextNode() argument
342 ContextNode(bool IsAllocation, CallInfo C) in ContextNode() function
345 void addClone(ContextNode *Clone) { in addClone() argument
356 ContextNode *getOrigNode() { in getOrigNode() argument
362 void addOrUpdateCallerEdge(ContextNode *Caller, AllocationType AllocType,
365 ContextEdge *findEdgeFromCallee(const ContextNode *Callee);
366 ContextEdge *findEdgeFromCaller(const ContextNode *Caller);
[all …]
H A DSampleContextTracker.cpp276 ContextTrieNode *ContextNode = getContextFor(DIL); in getContextSamplesFor() local
277 if (!ContextNode) in getContextSamplesFor()
286 FunctionSamples *Samples = ContextNode->getFunctionSamples(); in getContextSamplesFor()
287 if (Samples && ContextNode->getParentContext() != &RootContext) in getContextSamplesFor()
503 ContextTrieNode *ContextNode = &RootContext; in getContextFor() local
505 while (--I >= 0 && ContextNode) { in getContextFor()
508 ContextNode = ContextNode->getChildContext(CallSite, CalleeName); in getContextFor()
512 return ContextNode; in getContextFor()
520 ContextTrieNode *ContextNode = &RootContext; in getOrCreateContextPath() local
526 ContextNode = in getOrCreateContextPath()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/ctx_profile/tests/
H A DCtxInstrProfilingTest.cpp47 EXPECT_EQ(Ctx->size(), sizeof(ContextNode) + 10 * sizeof(uint64_t) + in TEST_F()
48 4 * sizeof(ContextNode *)); in TEST_F()
79 EXPECT_EQ(Subctx->size(), sizeof(ContextNode) + 3 * sizeof(uint64_t) + in TEST_F()
80 1 * sizeof(ContextNode *)); in TEST_F()
188 bool write(const ContextNode &Node) { in TEST_F()
210 __llvm_ctx_profile_fetch(&W, [](void *W, const ContextNode &Node) -> bool { in TEST_F()
219 __llvm_ctx_profile_fetch(&W2, [](void *W, const ContextNode &Node) -> bool { in TEST_F()
/freebsd/contrib/llvm-project/llvm/lib/ProfileData/
H A DPGOCtxProfWriter.cpp19 void PGOCtxProfileWriter::writeCounters(const ContextNode &Node) { in writeCounters()
32 const ContextNode &Node) { in writeImpl()
47 void PGOCtxProfileWriter::write(const ContextNode &RootNode) { in write()