diff options
author | Yabin Cui <yabinc@google.com> | 2018-02-26 12:12:44 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-02-26 12:12:44 -0800 |
commit | fbd54f751b970d7451ab216eff865b3cceeffdf4 (patch) | |
tree | 0d42460ab2282b578e38db3f1c4cc02e66b94c6e | |
parent | aa6d306692fe2fba1ad6b76c9293d5834cad7088 (diff) | |
download | extras-fbd54f751b970d7451ab216eff865b3cceeffdf4.tar.gz |
simpleperf: flush output before quick_exit.
Bug: http://b/73875722
Test: run simpleperf manually.
Change-Id: I010c8612b18cd4034199440cb178d9d9cc8f0ff4
-rw-r--r-- | simpleperf/command.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/simpleperf/command.cpp b/simpleperf/command.cpp index 314b9bc8..ee03720b 100644 --- a/simpleperf/command.cpp +++ b/simpleperf/command.cpp @@ -152,6 +152,8 @@ bool RunSimpleperfCmd(int argc, char** argv) { LOG(DEBUG) << "command '" << command_name << "' " << (result ? "finished successfully" : "failed"); // Quick exit to avoid cost freeing memory and closing files. + fflush(stdout); + fflush(stderr); android::base::quick_exit(result ? 0 : 1); return result; } |