summaryrefslogtreecommitdiff
path: root/lib/xray/xray_inmemory_log.cc
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2016-11-23 04:47:41 +0000
committerDean Michael Berris <dberris@google.com>2016-11-23 04:47:41 +0000
commit67877f12d9684f7ddb5e080dd7099cfeadd28316 (patch)
tree43cc926201430e0803582459963ebbdefe7bc768 /lib/xray/xray_inmemory_log.cc
parent4aeda2dc635122245662f5ca7462738d48714d67 (diff)
[XRay][compiler-rt] Add newlines to error messages (NFC).
This goes through all the calls to `Report(...)` to make sure that each one would have a newline at the end of the message for readability. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/xray/xray_inmemory_log.cc')
-rw-r--r--lib/xray/xray_inmemory_log.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/xray/xray_inmemory_log.cc b/lib/xray/xray_inmemory_log.cc
index d00e39316..a93972df3 100644
--- a/lib/xray/xray_inmemory_log.cc
+++ b/lib/xray/xray_inmemory_log.cc
@@ -61,7 +61,7 @@ static void retryingWriteAll(int Fd, char *Begin,
if (Written < 0) {
if (errno == EINTR)
continue; // Try again.
- Report("Failed to write; errno = %d", errno);
+ Report("Failed to write; errno = %d\n", errno);
return;
}
TotalBytes -= Written;
@@ -81,7 +81,7 @@ retryingReadSome(int Fd, char *Begin, char *End) XRAY_NEVER_INSTRUMENT {
if (BytesRead == -1) {
if (errno == EINTR)
continue;
- Report("Read error; errno = %d", errno);
+ Report("Read error; errno = %d\n", errno);
return std::make_pair(TotalBytesRead, false);
}
@@ -168,14 +168,14 @@ void __xray_InMemoryRawLog(int32_t FuncId,
sizeof(TmpFilename) - 10);
if (static_cast<size_t>((E + 6) - TmpFilename) >
(sizeof(TmpFilename) - 1)) {
- Report("XRay log file base too long: %s", flags()->xray_logfile_base);
+ Report("XRay log file base too long: %s\n", flags()->xray_logfile_base);
return -1;
}
internal_strncat(TmpFilename, TmpWildcardPattern,
sizeof(TmpWildcardPattern) - 1);
int Fd = mkstemp(TmpFilename);
if (Fd == -1) {
- Report("XRay: Failed opening temporary file '%s'; not logging events.",
+ Report("XRay: Failed opening temporary file '%s'; not logging events.\n",
TmpFilename);
return -1;
}
@@ -193,7 +193,7 @@ void __xray_InMemoryRawLog(int32_t FuncId,
&CPUFrequency)) {
CPUFrequency *= 1000;
} else {
- Report("Unable to determine CPU frequency for TSC accounting.");
+ Report("Unable to determine CPU frequency for TSC accounting.\n");
}
#elif defined(__arm__) || defined(__aarch64__)
// There is no instruction like RDTSCP in user mode on ARM. ARM's CP15 does
@@ -248,7 +248,7 @@ void __xray_InMemoryRawLog(int32_t FuncId,
timespec TS;
int result = clock_gettime(CLOCK_REALTIME, &TS);
if (result != 0) {
- Report("clock_gettime() returned %d, errno=%d.", result, int(errno));
+ Report("clock_gettime() returned %d, errno=%d.\n", result, int(errno));
TS.tv_sec = 0;
TS.tv_nsec = 0;
}