SWDEV-251360 - Add tracing for memory allocation/free.
This can be used to debug VM fault Change-Id: I7685485b0450ea84d10b710639ad7b6c5ec2fcf3
Цей коміт міститься в:
@@ -261,6 +261,9 @@ bool Memory::createInteropBuffer(GLenum targetType, int miplevel) {
|
||||
1, &agent, out.dmabuf_fd, 0, &size, &deviceMemory_, &metadata_size, (const void**)&metadata);
|
||||
close(out.dmabuf_fd);
|
||||
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_MEM, "Map GL memory %p, size 0x%zx, offset=0x%llx",
|
||||
deviceMemory_, size, out.buf_offset);
|
||||
|
||||
deviceMemory_ = static_cast<char*>(deviceMemory_) + out.buf_offset;
|
||||
|
||||
if (status != HSA_STATUS_SUCCESS) return false;
|
||||
@@ -283,6 +286,7 @@ bool Memory::createInteropBuffer(GLenum targetType, int miplevel) {
|
||||
void Memory::destroyInteropBuffer() {
|
||||
assert(kind_ == MEMORY_KIND_INTEROP && "Memory must be interop type.");
|
||||
hsa_amd_interop_unmap_buffer(deviceMemory_);
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_MEM, "Unmap GL memory %p", deviceMemory_);
|
||||
deviceMemory_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Посилання в новій задачі
Заблокувати користувача