diff options
author | Yan Wang <yawanng@google.com> | 2020-05-21 18:23:46 +0000 |
---|---|---|
committer | Yan Wang <yawanng@google.com> | 2020-05-21 19:45:10 +0000 |
commit | 39247545b80d6c16c30d443e98ac68d08d693865 (patch) | |
tree | 957d3f598914c1a9c248a169e6729317dbd65002 | |
parent | 8fb0f52466ab5d3b1ef1589311e91fbba8e60a81 (diff) | |
download | iorap-39247545b80d6c16c30d443e98ac68d08d693865.tar.gz |
maintenance: Add log for compilation failure.
Bug: 157177256
Test: run on a device and check the logcat.
Change-Id: Ie0112f01936916873e12c1a9b54a821afdc46648
-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 = |