SWDEV-403050: Multiple fixes for Memory Leaks in profiler

Change-Id: Ib720a81105af13898ff745ce0cbc2a48c1f4a980


[ROCm/rocprofiler commit: 08fc21ac31]
This commit is contained in:
Ammar ELWazir authored and Ammar ELWazir committed 2023-05-30 21:41:54 -05:00
1 parent 935b40b837
commit 5a7dec797e
26 files changed
+673 -592

No files matched your search

@@ -89,7 +89,7 @@ AgentInfo::AgentInfo(const hsa_agent_t agent, ::CoreApiTable* table) : handle_(a
xcc_num_ = 1;
}
int AgentInfo::getIndex() const { return index_; }
uint64_t AgentInfo::getIndex() const { return index_; }
hsa_device_type_t AgentInfo::getType() const { return type_; }
uint64_t AgentInfo::getHandle() const { return handle_; }
const std::string_view AgentInfo::getName() const { return name_; }
@@ -107,7 +107,7 @@ uint32_t AgentInfo::getPCIDomain() const { return pci_domain_; }
uint32_t AgentInfo::getPCILocationID() const { return pci_location_id_; }
uint32_t AgentInfo::getXccCount() const { return xcc_num_; }
void AgentInfo::setIndex(int index) { index_ = index; }
void AgentInfo::setIndex(uint64_t index) { index_ = index; }
void AgentInfo::setType(hsa_device_type_t type) { type_ = type; }
void AgentInfo::setHandle(uint64_t handle) { handle_ = handle; }
void AgentInfo::setName(const std::string& name) { strcpy(name_, name.c_str()); }
@@ -43,7 +43,7 @@ class AgentInfo {
AgentInfo();
AgentInfo(const hsa_agent_t agent, ::CoreApiTable* table);
int getIndex() const;
uint64_t getIndex() const;
hsa_device_type_t getType() const;
uint64_t getHandle() const;
const std::string_view getName() const;
@@ -62,7 +62,7 @@ class AgentInfo {
uint32_t getPCILocationID() const;
uint32_t getXccCount() const;
void setIndex(int index);
void setIndex(uint64_t index);
void setType(hsa_device_type_t type);
void setHandle(uint64_t handle);
void setName(const std::string& name);
@@ -78,7 +78,7 @@ class AgentInfo {
hsa_amd_memory_pool_t gpu_pool;
private:
int index_;
uint64_t index_;
hsa_device_type_t type_; // Agent type - Cpu = 0, Gpu = 1 or Dsp = 2
uint64_t handle_;
char name_[64];