[XRay][compiler-rt] Remove unused variable after refactoring
Follow-up to D30630. llvm-svn: 302861
This commit is contained in:
parent
724de21662
commit
71086a87b1
|
|
@ -205,7 +205,7 @@ inline bool loggingInitialized(
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
inline void writeNewBufferPreamble(pid_t Tid, timespec TS,
|
inline void writeNewBufferPreamble(pid_t Tid, timespec TS,
|
||||||
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
||||||
static constexpr int InitRecordsCount = 2;
|
static constexpr int InitRecordsCount = 2;
|
||||||
std::aligned_storage<sizeof(MetadataRecord)>::type Records[InitRecordsCount];
|
std::aligned_storage<sizeof(MetadataRecord)>::type Records[InitRecordsCount];
|
||||||
{
|
{
|
||||||
|
|
@ -254,7 +254,7 @@ inline void setupNewBuffer(int (*wall_clock_reader)(
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void writeNewCPUIdMetadata(uint16_t CPU, uint64_t TSC,
|
inline void writeNewCPUIdMetadata(uint16_t CPU, uint64_t TSC,
|
||||||
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
||||||
MetadataRecord NewCPUId;
|
MetadataRecord NewCPUId;
|
||||||
NewCPUId.Type = uint8_t(RecordType::Metadata);
|
NewCPUId.Type = uint8_t(RecordType::Metadata);
|
||||||
NewCPUId.RecordKind = uint8_t(MetadataRecord::RecordKinds::NewCPUId);
|
NewCPUId.RecordKind = uint8_t(MetadataRecord::RecordKinds::NewCPUId);
|
||||||
|
|
@ -272,7 +272,7 @@ inline void writeNewCPUIdMetadata(uint16_t CPU, uint64_t TSC,
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void writeNewCPUIdMetadata(uint16_t CPU,
|
inline void writeNewCPUIdMetadata(uint16_t CPU,
|
||||||
uint64_t TSC) XRAY_NEVER_INSTRUMENT {
|
uint64_t TSC) XRAY_NEVER_INSTRUMENT {
|
||||||
writeNewCPUIdMetadata(CPU, TSC, RecordPtr);
|
writeNewCPUIdMetadata(CPU, TSC, RecordPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@ inline void writeEOBMetadata() XRAY_NEVER_INSTRUMENT {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void writeTSCWrapMetadata(uint64_t TSC,
|
inline void writeTSCWrapMetadata(uint64_t TSC,
|
||||||
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
||||||
MetadataRecord TSCWrap;
|
MetadataRecord TSCWrap;
|
||||||
TSCWrap.Type = uint8_t(RecordType::Metadata);
|
TSCWrap.Type = uint8_t(RecordType::Metadata);
|
||||||
TSCWrap.RecordKind = uint8_t(MetadataRecord::RecordKinds::TSCWrap);
|
TSCWrap.RecordKind = uint8_t(MetadataRecord::RecordKinds::TSCWrap);
|
||||||
|
|
@ -312,8 +312,8 @@ inline void writeTSCWrapMetadata(uint64_t TSC) XRAY_NEVER_INSTRUMENT {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void writeFunctionRecord(int FuncId, uint32_t TSCDelta,
|
inline void writeFunctionRecord(int FuncId, uint32_t TSCDelta,
|
||||||
XRayEntryType EntryType,
|
XRayEntryType EntryType,
|
||||||
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
char *&MemPtr) XRAY_NEVER_INSTRUMENT {
|
||||||
std::aligned_storage<sizeof(FunctionRecord), alignof(FunctionRecord)>::type
|
std::aligned_storage<sizeof(FunctionRecord), alignof(FunctionRecord)>::type
|
||||||
AlignedFuncRecordBuffer;
|
AlignedFuncRecordBuffer;
|
||||||
auto &FuncRecord =
|
auto &FuncRecord =
|
||||||
|
|
@ -462,8 +462,8 @@ inline bool releaseThreadLocalBuffer(BufferQueue *BQ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool prepareBuffer(int (*wall_clock_reader)(clockid_t,
|
inline bool prepareBuffer(int (*wall_clock_reader)(clockid_t,
|
||||||
struct timespec *),
|
struct timespec *),
|
||||||
size_t MaxSize) XRAY_NEVER_INSTRUMENT {
|
size_t MaxSize) XRAY_NEVER_INSTRUMENT {
|
||||||
char *BufferStart = static_cast<char *>(Buffer.Buffer);
|
char *BufferStart = static_cast<char *>(Buffer.Buffer);
|
||||||
if ((RecordPtr + MaxSize) > (BufferStart + Buffer.Size - MetadataRecSize)) {
|
if ((RecordPtr + MaxSize) > (BufferStart + Buffer.Size - MetadataRecSize)) {
|
||||||
writeEOBMetadata();
|
writeEOBMetadata();
|
||||||
|
|
@ -612,8 +612,8 @@ inline void processFunctionHook(
|
||||||
|
|
||||||
// By this point, we are now ready to write at most 24 bytes (one metadata
|
// By this point, we are now ready to write at most 24 bytes (one metadata
|
||||||
// record and one function record).
|
// record and one function record).
|
||||||
auto BufferStart = static_cast<char *>(Buffer.Buffer);
|
assert((RecordPtr + (MetadataRecSize + FunctionRecSize)) -
|
||||||
assert((RecordPtr + (MetadataRecSize + FunctionRecSize)) - BufferStart >=
|
static_cast<char *>(Buffer.Buffer) >=
|
||||||
static_cast<ptrdiff_t>(MetadataRecSize) &&
|
static_cast<ptrdiff_t>(MetadataRecSize) &&
|
||||||
"Misconfigured BufferQueue provided; Buffer size not large enough.");
|
"Misconfigured BufferQueue provided; Buffer size not large enough.");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue