Don't duplicate embedded code objects (#1991)

If the code object is embedded in an already mapped file, and the
lifetime of the mapped file exceeds the lifetime of the executable,
we do not need to make a copy of the binary.

This allows the ROCR to present the code object URI as
file:///path/to/file#offset=X&size=Y.
This commit is contained in:
lmoriche
2020-04-06 03:07:35 -07:00
committed by GitHub
parent 6358e40a76
commit 9de5e90ab5
4 changed files with 30 additions and 9 deletions
+3
View File
@@ -73,6 +73,9 @@ public:
hsa_executable_t load_executable(const char*, const size_t,
hsa_executable_t,
hsa_agent_t);
hsa_executable_t load_executable_no_copy(const char*, const size_t,
hsa_executable_t,
hsa_agent_t);
void* global_addr_by_name(const char* name);