diff options
author | Yabin Cui <yabinc@google.com> | 2018-02-23 23:36:30 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-23 23:36:30 +0000 |
commit | aa6d306692fe2fba1ad6b76c9293d5834cad7088 (patch) | |
tree | 99a44b0c91f02e104ea5410f76f4104f81743397 | |
parent | e92a2d8a4329f9d91777a81db667ef71114b5ca6 (diff) | |
parent | ccbd2262ddde5060f6746c6268da240a48c3cd10 (diff) | |
download | extras-aa6d306692fe2fba1ad6b76c9293d5834cad7088.tar.gz |
Merge "simpleperf: use quick_exit."
-rw-r--r-- | simpleperf/command.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/simpleperf/command.cpp b/simpleperf/command.cpp index 3d6c2d2c..314b9bc8 100644 --- a/simpleperf/command.cpp +++ b/simpleperf/command.cpp @@ -22,6 +22,7 @@ #include <vector> #include <android-base/logging.h> +#include <android-base/quick_exit.h> #include "utils.h" @@ -150,5 +151,7 @@ bool RunSimpleperfCmd(int argc, char** argv) { bool result = command->Run(args); LOG(DEBUG) << "command '" << command_name << "' " << (result ? "finished successfully" : "failed"); + // Quick exit to avoid cost freeing memory and closing files. + android::base::quick_exit(result ? 0 : 1); return result; } |