Signed-off-by: zhangcui <zhangcui11@huawei.com>
This commit is contained in:
zhangcui 2022-10-21 03:13:39 +00:00 committed by Gitee
parent 2e96282f7b
commit 712ee7337e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions

View File

@ -994,7 +994,7 @@ public:
return false;
} else {
HLOGD("kernel notes size: %zu", notes.size());
buildId_ = ElfGetBuildId(reinterpret_cast<const unsigned char *>(notes.data()), notes.size());
buildId_ = ElfGetBuildId(reinterpret_cast<const unsigned char*>(notes.data()), notes.size());
}
const auto startTime = std::chrono::steady_clock::now();
@ -1068,7 +1068,7 @@ private:
std::string sysFile = "/sys/module/" + module_ + "/notes/.note.gnu.build-id";
std::string buildIdRaw = ReadFileToString(sysFile);
if (!buildIdRaw.empty()) {
buildId_ = ElfGetBuildId(reinterpret_cast<const unsigned char *>(buildIdRaw.data()), buildIdRaw.size());
buildId_ = ElfGetBuildId(reinterpret_cast<const unsigned char*>(buildIdRaw.data()), buildIdRaw.size());
HLOGD("kerne module %s(%s) build id %s", module_.c_str(), filePath_.c_str(),
buildId_.c_str());
return buildId_.empty() ? false : true;

View File

@ -646,7 +646,7 @@ void VirtualRuntime::UpdateFromPerfData(const std::vector<SymbolFileStruct> &sym
// use give us path ,we must reload it.
symbolsFile->LoadSymbols();
}
symbolsFile->id_ = symbolsFiles_.size();
symbolsFile->id_ = static_cast<int32_t>(symbolsFiles_.size());
symbolsFiles_.emplace_back(std::move(symbolsFile));
}
}