[PATCH] D54140: [XRay] Use TSC delta encoding for custom/typed events
Dean Michael Berris via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 01:01:09 PST 2018
dberris added inline comments.
================
Comment at: llvm/lib/XRay/RecordInitializer.cpp:178
+
+ assert(OffsetPtr > BeginOffset &&
+ OffsetPtr - BeginOffset <= MetadataRecord::kMetadataBodySize);
----------------
mboerger wrote:
> why assert and not return an error?
This invariant is required for the following math to make sense (getting the difference between the OffsetPtr and BeginOffset). Throughout LLVM, these invariants are checked through assertions, and aren't really recoverable errors from the caller's perspective.
https://reviews.llvm.org/D54140
More information about the llvm-commits
mailing list