summaryrefslogtreecommitdiff
path: root/simpleperf/dso.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2018-04-19 17:06:24 -0700
committerYabin Cui <yabinc@google.com>2018-04-19 18:28:40 -0700
commit2969a9e6379e776f1e43b625b7b7387efff2e47c (patch)
tree7701c7fb76dd45016adba6ed34b5b967fb5a0a2b /simpleperf/dso.cpp
parent1b3ca90fc5fb4ef2cae3857c2171f2e812d12b7f (diff)
downloadextras-2969a9e6379e776f1e43b625b7b7387efff2e47c.tar.gz
simpleperf: use binary mode for build_id_list.
As suggested in comments of https://android-review.googlesource.com/c/platform/system/extras/+/667472. Bug: none Test: run test.py. Change-Id: I55882f1cb07d87a5e09b75ab7ef901e478d614de
Diffstat (limited to 'simpleperf/dso.cpp')
-rw-r--r--simpleperf/dso.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/simpleperf/dso.cpp b/simpleperf/dso.cpp
index 2b3f083b..cdc21049 100644
--- a/simpleperf/dso.cpp
+++ b/simpleperf/dso.cpp
@@ -60,8 +60,7 @@ bool DebugElfFileFinder::SetSymFsDir(const std::string& symfs_dir) {
std::string build_id_list;
if (android::base::ReadFileToString(build_id_list_file, &build_id_list)) {
for (auto& line : android::base::Split(build_id_list, "\n")) {
- std::string s = android::base::Trim(line);
- std::vector<std::string> items = android::base::Split(s, "=");
+ std::vector<std::string> items = android::base::Split(line, "=");
if (items.size() == 2u) {
build_id_to_file_map_[items[0]] = items[1];
}