summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-05-15 13:39:36 -0700
committerYabin Cui <yabinc@google.com>2017-09-13 16:42:20 -0700
commit60cce13ceba0dc400fd4905a0c2c102650e55dad (patch)
tree22cf5e18ede4b49321aa1d9b4874ebe77ab00e72
parentb7c25d7f0aaa28af05f63e0faec4174bc7a3b2f8 (diff)
downloadextras-60cce13ceba0dc400fd4905a0c2c102650e55dad.tar.gz
simpleperf: fix report_sample_test.
When running cmd_report_sample.* tests, it may call ReportSampleCmd()->Run() more than once. If we shutdown protobuf library in one call, using protobuf in the following calls will encounter failures. Bug: http://b/37996565 Test: run CtsSimpleperfTestCases. Change-Id: I5ca217406e786645d45fda518055c4a63ab3db3c (cherry picked from commit b3675a5db81d02b07b92f8f13d37187a9cb4890c)
-rw-r--r--simpleperf/cmd_report_sample.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/simpleperf/cmd_report_sample.cpp b/simpleperf/cmd_report_sample.cpp
index 886d1b4c..83dc90bf 100644
--- a/simpleperf/cmd_report_sample.cpp
+++ b/simpleperf/cmd_report_sample.cpp
@@ -186,7 +186,6 @@ bool ReportSampleCommand::Run(const std::vector<std::string>& args) {
return false;
}
protobuf_coded_os.reset(nullptr);
- google::protobuf::ShutdownProtobufLibrary();
} else {
PrintLostSituation();
fflush(report_fp_);
@@ -332,7 +331,6 @@ bool ReportSampleCommand::DumpProtobufReport(const std::string& filename) {
return false;
}
}
- google::protobuf::ShutdownProtobufLibrary();
return true;
}