SWDEV-86035 - [PAL] Correct allocation logging

Since the allocation can be a suballocation, we should print both the
VA range for the allocation and the underlying memory object.

Change-Id: Ic9c707bbb78113b366d1b2c688e6fd33bdc8fd94


[ROCm/clr commit: 9e8a2f3266]
This commit is contained in:
Vladislav Sytchenko
2021-02-23 12:11:31 -05:00
parent d26aceba19
commit cae2f29c10
+7 -3
View File
@@ -190,9 +190,13 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
memRef()->gpu_ = params->gpu_;
}
if (memRef() != nullptr) {
ClPrint(amd::LOG_DEBUG, amd::LOG_RESOURCE, "Alloc: %8llx bytes, VM[%10llx, %10llx]",
iMem()->Desc().size, iMem()->Desc().gpuVirtAddr,
iMem()->Desc().gpuVirtAddr + iMem()->Desc().size);
ClPrint(amd::LOG_DEBUG, amd::LOG_RESOURCE,
"Alloc: %llx bytes, ptr[%p-%p], obj[%p-%p]",
size(),
vmAddress(),
vmAddress() + size(),
iMem()->Desc().gpuVirtAddr,
iMem()->Desc().gpuVirtAddr + iMem()->Desc().size);
}
}