[PATCH] D27038: [XRay][compiler-rt] XRay Flight Data Recorder Mode
Martin Pelikán via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 5 02:13:09 PST 2017
pelikan added inline comments.
================
Comment at: lib/xray/xray_fdr_logging.cc:214
+ clock_gettime(CLOCK_MONOTONIC, &TS);
+ std::memcpy(WalltimeMarker.Data, &TS, sizeof(TS));
+ }
----------------
pelikan wrote:
> GCC says this will always overflow. Can you please add a static_assert() that sizeof TS <= sizeof MetadataRecord::Data? Although, that alone won't exactly help AArch64 to build...
News from AArch64 land:
$ echo "#include <time.h>\nint main() { return sizeof(struct timespec); }" > a.c
$ aarch64-linux-gnu-gcc a.c && LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib64/ qemu-aarch64 ./a.out || echo $?
16
https://reviews.llvm.org/D27038
More information about the llvm-commits
mailing list