diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-05-21 21:29:55 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-05-21 21:29:55 +0000 |
commit | 583b65c06370f47b1b23e54da2a74766e1c4d116 (patch) | |
tree | 5d08ec413ef68ab87c05980acdd40daa88c14e6b | |
parent | d5a7cb7792842381cafc5de061a885f9e7ae4e6b (diff) | |
parent | ee129665c397c735d865f91b0b38dc435d9e4c09 (diff) | |
download | iorap-583b65c06370f47b1b23e54da2a74766e1c4d116.tar.gz |
Merge "maintenance: Add log for compilation failure." into rvc-dev am: ee129665c3
Change-Id: Ia75f2fe705ba9aa07add280ccab5a1a4ca251c96
-rw-r--r-- | src/maintenance/controller.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/maintenance/controller.cc b/src/maintenance/controller.cc index 073b938..e654e92 100644 --- a/src/maintenance/controller.cc +++ b/src/maintenance/controller.cc @@ -176,9 +176,16 @@ bool StartViaFork(const CompilerForkParameters& params) { LOG(ERROR) << "Child terminated abnormally, status: " << WEXITSTATUS(wstatus); return false; } - LOG(DEBUG) << "Child terminated, status: " << WEXITSTATUS(wstatus); - return true; + int status = WEXITSTATUS(wstatus); + LOG(DEBUG) << "Child terminated, status: " << status; + if (status == 0) { + LOG(DEBUG) << "Iorap compilation succeeded"; + return true; + } else { + LOG(ERROR) << "Iorap compilation failed"; + return false; + } } else { // we are the child that was forked. std::vector<std::string> argv_vec = MakeCompilerParams(params); @@ -338,10 +345,9 @@ bool CompileActivity(const db::DbHandle& db, activity_name.c_str()); if (!StartViaFork(compiler_params)) { LOG(ERROR) << "Compilation failed for package_id:" << package_id - <<" activity_name: " <<activity_name; + << " activity_name: " << activity_name; return false; } - } std::optional<db::PrefetchFileModel> compiled_trace = |