diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp --- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp @@ -209,7 +209,8 @@ ssize_t BytesWritten = sendmsg(SocketFD, &Message, 0); if (BytesWritten < 0) - return make_error("Failed to write FD to socket"); + return make_error("Failed to write FD to socket: " + + Twine(strerror(errno))); return Error::success(); } @@ -224,7 +225,8 @@ ssize_t BytesRead = recvmsg(SocketFD, &Message, 0); if (BytesRead < 0) - return make_error("Failed to read FD from socket"); + return make_error("Failed to read FD from socket: " + + Twine(strerror(errno))); struct cmsghdr *ControlMessage = CMSG_FIRSTHDR(&Message); @@ -246,7 +248,8 @@ if (PipeSuccessOrErr != 0) { return make_error( "Failed to create a pipe for interprocess communication between " - "llvm-exegesis and the benchmarking subprocess"); + "llvm-exegesis and the benchmarking subprocess: " + + Twine(strerror(errno))); } SubprocessMemory SPMemory;