13#ifndef LLVM_XRAY_PROFILE_H
14#define LLVM_XRAY_PROFILE_H
89 : Blocks(std::move(O.Blocks)), NodeStorage(std::move(O.NodeStorage)),
90 Roots(std::move(O.Roots)), PathIDMap(std::move(O.PathIDMap)),
94 Blocks = std::move(O.Blocks);
95 NodeStorage = std::move(O.NodeStorage);
96 Roots = std::move(O.Roots);
97 PathIDMap = std::move(O.PathIDMap);
107 swap(L.Blocks, R.Blocks);
108 swap(L.NodeStorage, R.NodeStorage);
109 swap(L.Roots, R.Roots);
110 swap(L.PathIDMap, R.PathIDMap);
111 swap(L.NextID, R.NextID);
115 using BlockList = std::list<Block>;
119 std::vector<TrieNode *> Callees{};
120 TrieNode *Caller =
nullptr;
128 std::list<TrieNode> NodeStorage;
131 SmallVector<TrieNode *, 4> Roots;
134 DenseMap<PathID, TrieNode *> PathIDMap;
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file defines the DenseMap class.
DenseMap< Block *, BlockRelaxAux > Blocks
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Profile instances are thread-compatible.
Profile & operator=(Profile &&O) noexcept
PathID internPath(ArrayRef< FuncID > P)
The stack represented in |P| must be in stack order (leaf to root).
BlockList::const_iterator const_iterator
Expected< std::vector< FuncID > > expandPath(PathID P) const
Provides a sequence of function IDs from a previously interned PathID.
const_iterator end() const
Error addBlock(Block &&B)
Appends a fully-formed Block instance into the Profile.
friend void swap(Profile &L, Profile &R)
Profile(Profile &&O) noexcept
const_iterator begin() const
Profile mergeProfilesByStack(const Profile &L, const Profile &R)
This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by...
Expected< Profile > profileFromTrace(const Trace &T)
This function takes a Trace and creates a Profile instance from it.
Expected< Profile > loadProfile(StringRef Filename)
This function will attempt to load an XRay Profiling Mode profile from the provided |Filename|.
Profile mergeProfilesByThread(const Profile &L, const Profile &R)
This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by...
This is an optimization pass for GlobalISel generic memory operations.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
std::vector< std::pair< PathID, Data > > PathData
uint64_t CumulativeLocalTime