summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/xray/xray_fdr_logging_impl.h
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-02-10 09:07:34 +0000
committerDean Michael Berris <dberris@google.com>2018-02-10 09:07:34 +0000
commitec81ae37bd835b4d3d89d5e7ac1aeb17a636b752 (patch)
tree3a173dd8830010dfeed20f9c402655187076d9ed /compiler-rt/lib/xray/xray_fdr_logging_impl.h
parentb8d7b1620b6af1ea1363bb15f5c7e8eab0138028 (diff)
downloadbcm5719-llvm-ec81ae37bd835b4d3d89d5e7ac1aeb17a636b752.tar.gz
bcm5719-llvm-ec81ae37bd835b4d3d89d5e7ac1aeb17a636b752.zip
[XRay] Rename Buffer.Buffer to Buffer.Data
Summary: some compiler (msvc) treats Buffer.Buffer as constructor and refuse to compile. NFC Authored by comicfans44. Reviewers: rnk, dberris Reviewed By: dberris Subscribers: llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40346 llvm-svn: 324807
Diffstat (limited to 'compiler-rt/lib/xray/xray_fdr_logging_impl.h')
-rw-r--r--compiler-rt/lib/xray/xray_fdr_logging_impl.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler-rt/lib/xray/xray_fdr_logging_impl.h b/compiler-rt/lib/xray/xray_fdr_logging_impl.h
index 59eab55b257..d1cbda96288 100644
--- a/compiler-rt/lib/xray/xray_fdr_logging_impl.h
+++ b/compiler-rt/lib/xray/xray_fdr_logging_impl.h
@@ -235,7 +235,7 @@ inline void setupNewBuffer(int (*wall_clock_reader)(
clockid_t, struct timespec *)) XRAY_NEVER_INSTRUMENT {
auto &TLD = getThreadLocalData();
auto &B = TLD.Buffer;
- TLD.RecordPtr = static_cast<char *>(B.Buffer);
+ TLD.RecordPtr = static_cast<char *>(B.Data);
pid_t Tid = syscall(SYS_gettid);
timespec TS{0, 0};
// This is typically clock_gettime, but callers have injection ability.
@@ -447,7 +447,7 @@ inline bool releaseThreadLocalBuffer(BufferQueue &BQArg) {
auto &TLD = getThreadLocalData();
auto EC = BQArg.releaseBuffer(TLD.Buffer);
if (EC != BufferQueue::ErrorCode::Ok) {
- Report("Failed to release buffer at %p; error=%s\n", TLD.Buffer.Buffer,
+ Report("Failed to release buffer at %p; error=%s\n", TLD.Buffer.Data,
BufferQueue::getErrorString(EC));
return false;
}
@@ -459,7 +459,7 @@ inline bool prepareBuffer(uint64_t TSC, unsigned char CPU,
struct timespec *),
size_t MaxSize) XRAY_NEVER_INSTRUMENT {
auto &TLD = getThreadLocalData();
- char *BufferStart = static_cast<char *>(TLD.Buffer.Buffer);
+ char *BufferStart = static_cast<char *>(TLD.Buffer.Data);
if ((TLD.RecordPtr + MaxSize) > (BufferStart + TLD.Buffer.Size)) {
if (!releaseThreadLocalBuffer(*TLD.BQ))
return false;
@@ -507,7 +507,7 @@ isLogInitializedAndReady(BufferQueue *LBQ, uint64_t TSC, unsigned char CPU,
TLD.RecordPtr = nullptr;
}
- if (TLD.Buffer.Buffer == nullptr) {
+ if (TLD.Buffer.Data == nullptr) {
auto EC = LBQ->getBuffer(TLD.Buffer);
if (EC != BufferQueue::ErrorCode::Ok) {
auto LS = __sanitizer::atomic_load(&LoggingStatus,
@@ -573,7 +573,7 @@ inline uint32_t writeCurrentCPUTSC(ThreadLocalData &TLD, uint64_t TSC,
inline void endBufferIfFull() XRAY_NEVER_INSTRUMENT {
auto &TLD = getThreadLocalData();
- auto BufferStart = static_cast<char *>(TLD.Buffer.Buffer);
+ auto BufferStart = static_cast<char *>(TLD.Buffer.Data);
if ((TLD.RecordPtr + MetadataRecSize) - BufferStart <=
ptrdiff_t{MetadataRecSize}) {
if (!releaseThreadLocalBuffer(*TLD.BQ))
@@ -656,7 +656,7 @@ inline void processFunctionHook(int32_t FuncId, XRayEntryType Entry,
}
// By this point, we are now ready to write up to 40 bytes (explained above).
- assert((TLD.RecordPtr + MaxSize) - static_cast<char *>(TLD.Buffer.Buffer) >=
+ assert((TLD.RecordPtr + MaxSize) - static_cast<char *>(TLD.Buffer.Data) >=
static_cast<ptrdiff_t>(MetadataRecSize) &&
"Misconfigured BufferQueue provided; Buffer size not large enough.");
OpenPOWER on IntegriCloud