告警清理

Signed-off-by:wenlong12 <wenlong12@huawei.com>

Signed-off-by: wenlong12 <wenlong12@huawei.com>
This commit is contained in:
wenlong12 2024-03-20 14:23:41 +08:00
parent 0ebf77838c
commit bd8cd6727b
3 changed files with 11 additions and 16 deletions

View File

@ -82,9 +82,6 @@ auto LinkNode<Key, Val>::GetLinkNode(Link *plink)
{
if (plink) {
LinkNode<Key, Val> *pnode {nullptr};
if (pnode == nullptr) {
return nullptr;
}
Link* offset = &pnode->link_;
auto nodeAddr = reinterpret_cast<char*>(plink) - reinterpret_cast<char*>(offset);
return reinterpret_cast<LinkNode<Key, Val>*>(nodeAddr);

View File

@ -921,10 +921,6 @@ public:
HLOGD("the symbol file is %s.", filePath_.c_str());
if (StringEndsWith(filePath_, ".hap") || StringEndsWith(filePath_, ".hsp")) {
dfxExtractor_ = std::make_unique<DfxExtractor>(filePath_);
if (dfxExtractor_ == nullptr) {
HLOGD("DfxExtractor create failed.");
return false;
}
if (!dfxExtractor_->GetHapAbcInfo(loadOffSet_, abcDataPtr_, abcDataSize_)) {
HLOGD("failed to call GetHapAbcInfo, the symbol file is:%s", filePath_.c_str());
return false;
@ -1193,16 +1189,18 @@ const DfxSymbol SymbolsFile::GetSymbolWithVaddr(uint64_t vaddrInFile)
6 6
7 7
*/
if (found != symbols_.begin() && found != symbols_.end()) {
if (found != symbols_.begin()) {
found = std::prev(found);
if (found->Contain(vaddrInFile)) {
found->offsetToVaddr_ = vaddrInFile - found->funcVaddr_;
if (!found->matched_) {
found->matched_ = true;
matchedSymbols_.push_back(&(*found));
if (found != symbols_.end()) {
if (found->Contain(vaddrInFile)) {
found->offsetToVaddr_ = vaddrInFile - found->funcVaddr_;
if (!found->matched_) {
found->matched_ = true;
matchedSymbols_.push_back(&(*found));
}
symbol = *found; // copy
HLOGV("found '%s' for vaddr 0x%016" PRIx64 "", symbol.ToString().c_str(), vaddrInFile);
}
symbol = *found; // copy
HLOGV("found '%s' for vaddr 0x%016" PRIx64 "", symbol.ToString().c_str(), vaddrInFile);
}
}

View File

@ -142,7 +142,7 @@ std::shared_ptr<DfxMap> VirtualThread::FindMapByFileInfo(const std::string name,
std::shared_ptr<DfxMap> VirtualThread::FindFirstMapByFileInfo(const std::string name) const
{
for (auto &map : memMaps_) {
for (const auto &map : memMaps_) {
if (map == nullptr || name != map->name) {
continue;
}