summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-05-15 13:39:36 -0700
committerYabin Cui <yabinc@google.com>2017-05-15 13:43:27 -0700
commitb3675a5db81d02b07b92f8f13d37187a9cb4890c (patch)
tree6230bc2d27a9b35218501fb184d16cf69789a05b
parent70c39c84be8f6e0ab2d5240c794a70a563432735 (diff)
downloadextras-b3675a5db81d02b07b92f8f13d37187a9cb4890c.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
-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 e28ea3b4..f43f6821 100644
--- a/simpleperf/cmd_report_sample.cpp
+++ b/simpleperf/cmd_report_sample.cpp
@@ -184,7 +184,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_);
@@ -331,7 +330,6 @@ bool ReportSampleCommand::DumpProtobufReport(const std::string& filename) {
return false;
}
}
- google::protobuf::ShutdownProtobufLibrary();
return true;
}