summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2018-02-23 23:36:30 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-02-23 23:36:30 +0000
commitaa6d306692fe2fba1ad6b76c9293d5834cad7088 (patch)
tree99a44b0c91f02e104ea5410f76f4104f81743397
parente92a2d8a4329f9d91777a81db667ef71114b5ca6 (diff)
parentccbd2262ddde5060f6746c6268da240a48c3cd10 (diff)
downloadextras-aa6d306692fe2fba1ad6b76c9293d5834cad7088.tar.gz
Merge "simpleperf: use quick_exit."
-rw-r--r--simpleperf/command.cpp3
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;
}