[PATCH] D32844: [XRay] [compiler-rt] FDR logging arg1 handler
Dean Michael Berris via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 17:53:33 PDT 2017
dberris added inline comments.
================
Comment at: lib/xray/xray_fdr_logging_impl.h:586-595
+ } else {
+ // If the delta is greater than the range for a uint32_t, then we write out
+ // the TSC wrap metadata entry with the full TSC, and the TSC for the
+ // function record be 0.
+ auto Delta = TSC - TLD.LastTSC;
+ if (Delta > std::numeric_limits<int32_t>::max())
+ writeTSCWrapMetadata(TSC);
----------------
You can turn this into an early return:
```
if (CPU != TLD.CurrentCPU) {
...
return RecordTSCDelta;
}
// rest of code that's in else branch.
```
================
Comment at: lib/xray/xray_fdr_logging_impl.h:721-722
writeFunctionRecord(FuncId, RecordTSCDelta, Entry, TLD.RecordPtr);
+ if (Entry == XRayEntryType::LOG_ARGS_ENTRY)
+ writeCallArgumentMetadata(Arg1);
----------------
Why isn't this just in the cases above?
https://reviews.llvm.org/D32844
More information about the llvm-commits
mailing list