Lines Matching +full:node +full:- +full:version
47 IndexedVersion Version) const {
48 switch (Version) {
54 llvm_unreachable("unsupported MemProf version");
86 IndexedVersion Version) const {
87 switch (Version) {
93 llvm_unreachable("unsupported MemProf version");
138 const MemProfSchema &Schema, raw_ostream &OS, IndexedVersion Version,
141 switch (Version) {
149 llvm_unreachable("unsupported MemProf version");
163 IndexedAllocationInfo Node;
164 Node.CSId = endian::readNext<CallStackId, llvm::endianness::little>(Ptr);
165 Node.Info.deserialize(Schema, Ptr);
167 Record.AllocSites.push_back(Node);
194 IndexedAllocationInfo Node;
195 Node.CSId =
197 Node.Info.deserialize(Schema, Ptr);
199 Record.AllocSites.push_back(Node);
222 IndexedVersion Version) {
223 switch (Version) {
229 llvm_unreachable("unsupported MemProf version");
309 // - the frames in the given call stack in the root-to-leaf order
311 // - the length of the given call stack
313 // If a given call stack has a non-empty common prefix relative to the previous
316 // - the relative location of the common prefix, encoded as a negative number.
318 // - a portion of the given call stack that's beyond the common prefix
320 // - the length of the given call stack, including the length of the common
324 // to reconstruct a call stack -- read the call stack length and scan backward
327 // stack as if we were deserializing an array in a typical way -- the call stack
328 // length followed by the frames in the leaf-to-root order except that we need
342 auto Pos = std::mismatch(Prev->rbegin(), Prev->rend(), CallStack->rbegin(),
343 CallStack->rend());
344 CommonLen = std::distance(CallStack->rbegin(), Pos.second);
358 RadixArray.push_back(ParentIndex - CurrentIndex);
362 assert(CommonLen <= CallStack->size());
367 MemProfFrameIndexes ? MemProfFrameIndexes->find(F)->second : F);
369 assert(CallStack->size() == Indexes.size());
372 RadixArray.push_back(CallStack->size());
376 return RadixArray.size() - 1;
402 // CallStackId 1: f1 -> f2 -> f3
404 // CallStackId 2: +--- f4 -> f5
406 // CallStackId 3: +--> f6
419 // CallStackId 2: f1 -- f4 -> f5
421 // CallStackId 3: | +--> f6
423 // CallStackId 1: +--> f2 -> f3
427 // All this is a quick-n-dirty trick to reduce the number of jumps. The
428 // proper way would be to compute the weight of each radix tree node -- how
429 // many call stacks use a given radix tree node, and encode a radix tree from
430 // the heaviest node first. We do not do so because that's a lot of work.
470 // Call Stack 2: F1 -> F2
471 // Call Stack 3: F1 -> F2 -> F3
478 // Call Stack 2: +---> F2
480 // Call Stack 3: +---> F3
494 // "RadixArray.size() - 1" below is problematic if RadixArray is empty.
501 for (size_t I = 0, J = RadixArray.size() - 1; I < J; ++I, --J)
506 V = RadixArray.size() - 1 - V;