Home
last modified time | relevance | path

Searched refs:build_id (Results 1 – 25 of 37) sorted by relevance

12

/system/core/debuggerd/libdebuggerd/test/
Delf_fake.cpp29 void elf_set_fake_build_id(const std::string& build_id) { in elf_set_fake_build_id() argument
30 g_build_id = build_id; in elf_set_fake_build_id()
33 bool elf_get_build_id(unwindstack::Memory*, uintptr_t, std::string* build_id) { in elf_get_build_id() argument
35 *build_id = g_build_id; in elf_get_build_id()
DUnwinderMock.h33 void MockSetBuildID(uint64_t offset, const std::string& build_id) { in MockSetBuildID() argument
36 std::string* new_build_id = new std::string(build_id); in MockSetBuildID()
37 map_info->build_id = reinterpret_cast<uintptr_t>(new_build_id); in MockSetBuildID()
/system/extras/simpleperf/
Ddso_test.cpp38 BuildId build_id(ELF_FILE_BUILD_ID); in TEST() local
40 "%s=%s\n", build_id.ToString().c_str(), android::base::Basename(tmpfile.path).c_str()); in TEST()
46 ASSERT_EQ(finder.FindDebugFile("elf", false, build_id), std::string(tmpfile.path)); in TEST()
66 BuildId build_id(ELF_FILE_BUILD_ID); in TEST() local
67 ASSERT_EQ(finder.FindDebugFile(ELF_FILE, false, build_id), GetTestDataDir() + ELF_FILE); in TEST()
80 BuildId build_id; in TEST() local
81 ASSERT_EQ(finder.FindDebugFile("[vdso]", false, build_id), fake_vdso32); in TEST()
82 ASSERT_EQ(finder.FindDebugFile("[vdso]", true, build_id), fake_vdso64); in TEST()
115 BuildId build_id; in TEST() local
116 ASSERT_EQ(finder.FindDebugFile("elf", false, build_id), symfs_dir + OS_PATH_SEPARATOR + "elf"); in TEST()
[all …]
Dbuild_id.h75 bool operator==(const BuildId& build_id) const {
76 return memcmp(data_, build_id.data_, BUILD_ID_SIZE) == 0;
79 bool operator!=(const BuildId& build_id) const {
80 return !(*this == build_id);
92 inline std::ostream& operator<<(std::ostream& os, const BuildId& build_id) {
93 os << build_id.ToString();
Ddso.cpp91 BuildId build_id; in CollectBuildIdInDir() local
94 if (status == ElfStatus::NO_ERROR && elf->GetBuildId(&build_id) == ElfStatus::NO_ERROR) { in CollectBuildIdInDir()
95 build_id_to_file_map_[build_id.ToString()] = path; in CollectBuildIdInDir()
109 static bool CheckDebugFilePath(const std::string& path, BuildId& build_id, in CheckDebugFilePath() argument
124 bool match = build_id == debug_build_id; in CheckDebugFilePath()
126 LOG(WARNING) << path << " isn't used because of build id mismatch: expected " << build_id in CheckDebugFilePath()
133 BuildId& build_id) { in FindDebugFile() argument
141 if (build_id.IsEmpty()) { in FindDebugFile()
143 GetBuildIdFromDsoPath(dso_path, &build_id); in FindDebugFile()
148 if (!build_id.IsEmpty() || GetBuildIdFromDsoPath(dso_path, &build_id)) { in FindDebugFile()
[all …]
Dread_elf_test.cpp36 BuildId build_id; in TEST() local
39 ASSERT_FALSE(GetBuildIdFromNoteSection(data.data(), 0, &build_id)); in TEST()
60 ASSERT_TRUE(GetBuildIdFromNoteSection(start, p - start, &build_id)); in TEST()
61 ASSERT_TRUE(build_id == expected_build_id); in TEST()
66 BuildId build_id; in TEST() local
70 ASSERT_EQ(ElfStatus::NO_ERROR, elf->GetBuildId(&build_id)); in TEST()
71 ASSERT_EQ(build_id, BuildId(elf_file_build_id)); in TEST()
75 BuildId build_id; in TEST() local
80 ASSERT_EQ(ElfStatus::NO_ERROR, elf->GetBuildId(&build_id)); in TEST()
81 ASSERT_EQ(build_id, native_lib_build_id); in TEST()
[all …]
Denvironment_test.cpp106 BuildId build_id; in TEST() local
110 ASSERT_TRUE(GetModuleBuildId("fake_kernel_module", &build_id, GetTestData("sysfs"))); in TEST()
111 ASSERT_EQ(build_id, BuildId("3e0ba155286f3454")); in TEST()
Dcmd_inject.cpp305 BuildId build_id; in ProcessBranchListFile() local
306 return GetBuildIdFromDsoPath(dso->GetDebugFilePath(), &build_id) && in ProcessBranchListFile()
307 build_id == expected_build_id; in ProcessBranchListFile()
312 BuildId build_id(binary_proto.build_id()); in ProcessBranchListFile() local
313 std::unique_ptr<Dso> dso = Dso::CreateElfDsoWithBuildId(binary_proto.path(), build_id); in ProcessBranchListFile()
314 if (!dso || !FilterDso(dso.get()) || !check_build_id(dso.get(), build_id)) { in ProcessBranchListFile()
408 BuildId build_id = Dso::FindExpectedBuildIdForPath(dso->Path()); in PostProcessBranchList() local
409 if (!build_id.IsEmpty()) { in PostProcessBranchList()
410 binary_proto->set_build_id(build_id.ToString().substr(2)); in PostProcessBranchList()
Dread_elf.h42 ElfStatus GetBuildIdFromNoteFile(const std::string& filename, BuildId* build_id);
88 virtual ElfStatus GetBuildId(BuildId* build_id) = 0;
107 bool GetBuildIdFromNoteSection(const char* section, size_t section_size, BuildId* build_id);
Ddso.h43 BuildId& build_id);
143 BuildId& build_id);
228 bool GetBuildIdFromDsoPath(const std::string& dso_path, BuildId* build_id);
Denvironment.h64 bool GetKernelBuildId(BuildId* build_id);
65 bool GetModuleBuildId(const std::string& module_name, BuildId* build_id,
Drecord_equal_test.h29 ASSERT_EQ(r1.build_id, r2.build_id); in CheckBuildIdRecordDataEqual()
Drecord_file_test.cpp74 BuildId build_id(p); in TEST_F() local
76 build_id_records.push_back(BuildIdRecord(false, getpid(), build_id, "init")); in TEST_F()
Dread_elf.cpp91 bool GetBuildIdFromNoteSection(const char* section, size_t section_size, BuildId* build_id) { in GetBuildIdFromNoteSection() argument
110 *build_id = BuildId(p + namesz, descsz); in GetBuildIdFromNoteSection()
121 ElfStatus GetBuildIdFromNoteFile(const std::string& filename, BuildId* build_id) { in GetBuildIdFromNoteFile() argument
126 if (!GetBuildIdFromNoteSection(content.c_str(), content.size(), build_id)) { in GetBuildIdFromNoteFile()
342 ElfStatus GetBuildId(BuildId* build_id) override { in GetBuildId() argument
355 if (GetBuildIdFromNoteSection(data.data(), data.size(), build_id)) { in GetBuildId()
/system/extras/simpleperf/scripts/
Dapp_profiler.py103 build_id = self.readelf.get_build_id(path)
104 if build_id:
105 entry = self.host_build_id_map.get(build_id)
114 self.host_build_id_map[build_id] = HostElfEntry(path, unique_name, score)
142 build_id, filename = items
144 self.device_build_id_map[build_id] = filename
149 for build_id in self.host_build_id_map:
150 if build_id not in self.device_build_id_map:
151 entry = self.host_build_id_map[build_id]
154 for build_id in self.device_build_id_map:
[all …]
Dbinary_cache_builder.py108 build_id = self._read_build_id(os.path.join(root, filename))
111 if expected_build_id == build_id:
154 build_id = self.binaries[binary]
160 self._check_and_pull_binary(binary, build_id, binary_cache_file)
171 build_id = self._read_build_id(binary_cache_file)
172 if expected_build_id != build_id:
Dpprof_proto_generator.py137 print('%sbuild_id: %s(%d)' % (space, self.string(mapping.build_id),
138 mapping.build_id))
385 binary_path, build_id = self.get_binary(symbol.dso_name)
386 mapping_id = self.get_mapping_id(symbol.mapping[0], binary_path, build_id)
405 def get_mapping_id(self, report_mapping, filename, build_id): argument
407 build_id_id = self.get_string_id(build_id)
426 build_id = ''
442 build_id = elf_build_id
446 if not build_id and build_id_in_perf_data.startswith('0x'):
448 build_id = build_id_in_perf_data[2:] # remove '0x'
[all …]
Dutils.py766 build_id = result.group(1)
768 build_id = self.pad_build_id(build_id)
769 return build_id
775 def pad_build_id(build_id): argument
777 if len(build_id) < 40:
778 build_id += '0' * (40 - len(build_id))
780 build_id = build_id[:40]
781 return '0x' + build_id
/system/core/libunwindstack/benchmarks/
DElfBenchmark.cpp115 uintptr_t id = build_id_map_info->build_id; in BM_elf_get_build_id_from_object()
118 build_id_map_info->build_id = 0; in BM_elf_get_build_id_from_object()
133 uintptr_t id = build_id_map_info->build_id; in BM_elf_get_build_id_from_file()
136 build_id_map_info->build_id = 0; in BM_elf_get_build_id_from_file()
/system/core/libunwindstack/include/unwindstack/
DMapInfo.h44 build_id(0) {} in MapInfo()
55 build_id(0) {} in MapInfo()
90 std::atomic_uintptr_t build_id; member
/system/core/libunwindstack/tools/
Dunwind_info.cpp120 std::string build_id = elf.GetBuildID(); in GetElfInfo() local
121 if (!build_id.empty()) { in GetElfInfo()
123 for (size_t i = 0; i < build_id.size(); ++i) { in GetElfInfo()
124 printf("%02hhx", build_id[i]); in GetElfInfo()
/system/core/libunwindstack/tests/
DElfFake.h85 void FakeSetBuildID(std::string& build_id) { fake_build_id_ = build_id; } in FakeSetBuildID() argument
86 void FakeSetBuildID(const char* build_id) { fake_build_id_ = build_id; } in FakeSetBuildID() argument
DMapInfoGetBuildIDTest.cpp85 std::string build_id = {static_cast<char>(0xfa), static_cast<char>(0xab), static_cast<char>(0x12), in TEST_F() local
87 elf_interface_->FakeSetBuildID(build_id); in TEST_F()
/system/core/libunwindstack/
DMapInfo.cpp296 uintptr_t id = build_id.load(); in ~MapInfo()
303 uintptr_t id = build_id.load(); in GetBuildID()
332 if (build_id.compare_exchange_weak(expected_id, id)) { in GetBuildID()
DElfInterface.cpp316 std::string build_id(hdr.n_descsz, '\0'); in ReadBuildID() local
317 if (memory_->ReadFully(gnu_build_id_offset_ + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildID()
318 return build_id; in ReadBuildID()
667 std::string build_id(hdr.n_descsz, '\0'); in ReadBuildIDFromMemory() local
668 if (memory->ReadFully(note_offset + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildIDFromMemory()
669 return build_id; in ReadBuildIDFromMemory()

12