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.
此提交包含在:
lmoriche authored and GitHub committed 2020-04-06 15:37:35 +05:30
1 父節點 6358e40a76
當前提交 9de5e90ab5
4 file changed
+30 -9

No files matched your search

+3
查看文件
@@ -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);