From a691aeb3ab09a7101a00a5b2d546257436990eb2 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Thu, 8 Aug 2019 18:00:51 -0500 Subject: [PATCH] inheritance fix Change-Id: I1ff0539b658c5e742a05085b8b5514ffd2c10f47 [ROCm/rocprofiler commit: c635e3a25efe279d485456528321c820afc512b1] --- projects/rocprofiler/src/xml/xml.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/projects/rocprofiler/src/xml/xml.h b/projects/rocprofiler/src/xml/xml.h index 545cb8553a..5643c7ea32 100644 --- a/projects/rocprofiler/src/xml/xml.h +++ b/projects/rocprofiler/src/xml/xml.h @@ -430,13 +430,6 @@ class Xml { void Copy(const level_t* from, level_t* to) { level_t* level = to; if (level == NULL) { - const std::string name = GetOption("name", from); - if (name.size() != 0) { - for (auto node : level_->nodes) { - if (name == GetOption("name", node)) return; - } - } - AddLevel(from->tag); level = level_; } @@ -445,9 +438,10 @@ class Xml { for (auto node : from->nodes) { bool found = false; + const std::string name = GetOption("name", node); const std::string global_tag = GlobalTag(level->tag) + "." + node->tag; for (auto item : (*map_)[global_tag]) { - if (node == item->copy) { + if ((name == GetOption("name", item)) || (node == item->copy)) { found = true; break; }