summaryrefslogtreecommitdiff
path: root/simpleperf/workload.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-09-21 12:28:46 -0700
committerYabin Cui <yabinc@google.com>2015-09-21 12:28:46 -0700
commit19c8d5f55b1ff4f6953eb53019d148adab0459a5 (patch)
treef11d3aebe86d9b589724a55b3f55afaa981290ab /simpleperf/workload.cpp
parenta228293f231c513a8690b033ad3c68c7213bc2d0 (diff)
parent6239958bddfb47562dc8068977bc1bf695973394 (diff)
downloadextras-19c8d5f55b1ff4f6953eb53019d148adab0459a5.tar.gz
resolved conflicts for 6239958b to stage-aosp-master
Change-Id: I66d12e9a15b5e6aecd4938b9ce4ac76a0f3863e4
Diffstat (limited to 'simpleperf/workload.cpp')
-rw-r--r--simpleperf/workload.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/simpleperf/workload.cpp b/simpleperf/workload.cpp
index 6f07cdae..7e129b38 100644
--- a/simpleperf/workload.cpp
+++ b/simpleperf/workload.cpp
@@ -108,9 +108,9 @@ static void ChildProcessFn(std::vector<std::string>& args, int start_signal_fd,
TEMP_FAILURE_RETRY(write(exec_child_fd, &exec_child_failed, 1));
close(exec_child_fd);
errno = saved_errno;
- PLOG(ERROR) << "execvp(" << argv[0] << ") failed";
+ PLOG(ERROR) << "child process failed to execvp(" << argv[0] << ")";
} else {
- PLOG(DEBUG) << "child process failed to receive start_signal, nread = " << nread;
+ PLOG(ERROR) << "child process failed to receive start_signal, nread = " << nread;
}
exit(1);
}
@@ -126,7 +126,11 @@ bool Workload::Start() {
char exec_child_failed;
ssize_t nread = TEMP_FAILURE_RETRY(read(exec_child_fd_, &exec_child_failed, 1));
if (nread != 0) {
- ((nread == -1) ? PLOG(ERROR) : LOG(ERROR)) << "exec child failed, nread = " << nread;
+ if (nread == -1) {
+ PLOG(ERROR) << "failed to receive error message from child process";
+ } else {
+ LOG(ERROR) << "received error message from child process";
+ }
return false;
}
work_state_ = Started;