[PATCH] D54989: [XRay] Move-only Allocator, FunctionCallTrie, and Array
Marcus Boerger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 27 23:03:01 PST 2018
mboerger added inline comments.
================
Comment at: compiler-rt/lib/xray/xray_profiling.cc:58
+
+// We use a separate guard for ensuring that for this thread, if we're already
+// cleaning up, that any signal handlers don't attempt to cleanup nor
----------------
That sentence is hard to parse.
================
Comment at: compiler-rt/lib/xray/xray_segmented_array.h:351
- size_t size() const XRAY_NEVER_INSTRUMENT { return Size; }
-
- T *Append(const T &E) XRAY_NEVER_INSTRUMENT {
- if (UNLIKELY(Head == &SentinelSegment))
- if (InitHeadAndTail() == nullptr)
- return nullptr;
-
- auto Offset = Size % ElementsPerSegment;
- if (UNLIKELY(Size != 0 && Offset == 0))
- if (AppendNewSegment() == nullptr)
- return nullptr;
-
- auto Base = static_cast<Segment *>(Tail)->Data;
- auto AlignedOffset = Base + (Offset * AlignedElementStorageSize);
- auto Position = reinterpret_cast<T *>(AlignedOffset);
- *Position = E;
- ++Size;
- return Position;
- }
+ uint64_t size() const XRAY_NEVER_INSTRUMENT { return Size; }
----------------
why change size?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54989/new/
https://reviews.llvm.org/D54989
More information about the llvm-commits
mailing list