14 #ifndef LLVM_XRAY_PROFILE_H 15 #define LLVM_XRAY_PROFILE_H 90 : Blocks(std::move(
O.Blocks)), NodeStorage(std::move(
O.NodeStorage)),
91 Roots(std::move(
O.Roots)), PathIDMap(std::move(
O.PathIDMap)),
95 Blocks = std::move(
O.Blocks);
96 NodeStorage = std::move(
O.NodeStorage);
97 Roots = std::move(
O.Roots);
98 PathIDMap = std::move(
O.PathIDMap);
108 swap(L.Blocks, R.Blocks);
109 swap(L.NodeStorage, R.NodeStorage);
110 swap(L.Roots, R.Roots);
111 swap(L.PathIDMap, R.PathIDMap);
112 swap(L.NextID, R.NextID);
116 using BlockList = std::list<Block>;
120 std::vector<TrieNode *> Callees{};
121 TrieNode *Caller =
nullptr;
129 std::list<TrieNode> NodeStorage;
144 bool empty()
const {
return Blocks.empty(); }
const_iterator end() const
This class represents lattice values for constants.
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...
BlockList::const_iterator const_iterator
PathID internPath(ArrayRef< FuncID > P)
The stack represented in |P| must be in stack order (leaf to root).
Tagged union holding either a T or a Error.
Expected< std::vector< FuncID > > expandPath(PathID P) const
Provides a sequence of function IDs from a previously interned PathID.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Expected< Profile > profileFromTrace(const Trace &T)
This function takes a Trace and creates a Profile instance from it.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Profile & operator=(Profile &&O) noexcept
uint64_t CumulativeLocalTime
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
friend void swap(Profile &L, Profile &R)
Profile instances are thread-compatible.
Profile mergeProfilesByThread(const Profile &L, const Profile &R)
This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by...
Error addBlock(Block &&B)
Appends a fully-formed Block instance into the Profile.
Expected< Profile > loadProfile(StringRef Filename)
This function will attempt to load an XRay Profiling Mode profile from the provided |Filename|...
Lightweight error class with error context and mandatory checking.
std::vector< std::pair< PathID, Data > > PathData