Skip to content

Commit

Permalink
Bug fix in patching ctrlpkt-pm symbol
Browse files Browse the repository at this point in the history
Signed-off-by: rbramand <[email protected]>
  • Loading branch information
rbramand committed Dec 3, 2024
1 parent 3ee37cf commit 526a9d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/runtime_src/core/common/api/xrt_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class module_impl
throw std::runtime_error("Not supported");
}

[[nodiscard]] virtual const std::vector<std::string>&
[[nodiscard]] virtual const std::set<std::string>&
get_ctrlpkt_pm_dynsyms() const
{
throw std::runtime_error("Not supported");
Expand Down Expand Up @@ -500,7 +500,7 @@ class module_elf : public module_impl
bool m_restore_buf_exist = false;
size_t m_scratch_pad_mem_size = 0;

std::vector<std::string> m_ctrlpkt_pm_dynsyms; // preemption dynsyms in elf
std::set<std::string> m_ctrlpkt_pm_dynsyms; // preemption dynsyms in elf
std::map<std::string, buf> m_ctrlpkt_pm_bufs; // preemption buffers map

// The ELF sections embed column and page information in their
Expand Down Expand Up @@ -723,7 +723,7 @@ class module_elf : public module_impl
static constexpr const char* ctrlpkt_pm_dynsym = "ctrlpkt-pm";
if (std::string(symname).find(ctrlpkt_pm_dynsym) != std::string::npos) {
// store ctrlpkt preemption symbols which is later used for patching instr buf
m_ctrlpkt_pm_dynsyms.emplace_back(symname);
m_ctrlpkt_pm_dynsyms.emplace(symname);
}

// Get control code section referenced by the symbol, col, and page
Expand Down Expand Up @@ -950,7 +950,7 @@ class module_elf : public module_impl
return m_ctrl_packet;
}

[[nodiscard]] const std::vector<std::string>&
[[nodiscard]] const std::set<std::string>&
get_ctrlpkt_pm_dynsyms() const override
{
return m_ctrlpkt_pm_dynsyms;
Expand Down

0 comments on commit 526a9d7

Please sign in to comment.