From cae2f29c1009cc49fe0461d17e87589b6d1c2eeb Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Tue, 23 Feb 2021 12:11:31 -0500 Subject: [PATCH] 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: 9e8a2f3266c97a23b11eca54f54cd1d351cd2428] --- projects/clr/rocclr/device/pal/palmemory.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/clr/rocclr/device/pal/palmemory.cpp b/projects/clr/rocclr/device/pal/palmemory.cpp index 81c7e73240..4259ad0242 100644 --- a/projects/clr/rocclr/device/pal/palmemory.cpp +++ b/projects/clr/rocclr/device/pal/palmemory.cpp @@ -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); } }