From 2b5e475db9da24e8db657a1a64c48824f475d9bd Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Fri, 23 Jun 2023 10:20:16 +0000 Subject: [PATCH] refactor: use hex values to print TSP usage Signed-off-by: Dunajski, Bartosz --- .../command_queue/hardware_interface_xehp_and_later.inl | 2 +- shared/source/helpers/timestamp_packet.h | 2 +- shared/source/utilities/tag_allocator.inl | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/opencl/source/command_queue/hardware_interface_xehp_and_later.inl b/opencl/source/command_queue/hardware_interface_xehp_and_later.inl index ae4a187088..405745beb6 100644 --- a/opencl/source/command_queue/hardware_interface_xehp_and_later.inl +++ b/opencl/source/command_queue/hardware_interface_xehp_and_later.inl @@ -127,7 +127,7 @@ inline void HardwareInterface::programWalker( if (walkerArgs.currentTimestampPacketNodes && DebugManager.flags.PrintTimestampPacketUsage.get() == 1) { auto gpuVa = walkerArgs.currentTimestampPacketNodes->peekNodes()[walkerArgs.currentDispatchIndex]->getGpuAddress(); - printf("\nPID:%u, TSP used for Walker: 0x%" PRIu64 ", cmdBuffer pos: 0x%" PRIu64, SysCalls::getProcessId(), gpuVa, commandStream.getCurrentGpuAddressPosition()); + printf("\nPID:%u, TSP used for Walker: 0x%" PRIX64 ", cmdBuffer pos: 0x%" PRIX64, SysCalls::getProcessId(), gpuVa, commandStream.getCurrentGpuAddressPosition()); } if (partitionWalker) { diff --git a/shared/source/helpers/timestamp_packet.h b/shared/source/helpers/timestamp_packet.h index 8e2a9cb5b2..080f44c04f 100644 --- a/shared/source/helpers/timestamp_packet.h +++ b/shared/source/helpers/timestamp_packet.h @@ -97,7 +97,7 @@ struct TimestampPacketHelper { using COMPARE_OPERATION = typename GfxFamily::MI_SEMAPHORE_WAIT::COMPARE_OPERATION; if (DebugManager.flags.PrintTimestampPacketUsage.get() == 1) { - printf("\nPID: %u, TSP used for Semaphore: 0x%" PRIu64 ", cmdBuffer pos: 0x%" PRIu64, SysCalls::getProcessId(), timestampPacketNode.getGpuAddress(), cmdStream.getCurrentGpuAddressPosition()); + printf("\nPID: %u, TSP used for Semaphore: 0x%" PRIX64 ", cmdBuffer pos: 0x%" PRIX64, SysCalls::getProcessId(), timestampPacketNode.getGpuAddress(), cmdStream.getCurrentGpuAddressPosition()); } auto compareAddress = getContextEndGpuAddress(timestampPacketNode); diff --git a/shared/source/utilities/tag_allocator.inl b/shared/source/utilities/tag_allocator.inl index 31a3ac8ba6..4db1d542f0 100644 --- a/shared/source/utilities/tag_allocator.inl +++ b/shared/source/utilities/tag_allocator.inl @@ -35,7 +35,7 @@ TagNodeBase *TagAllocator::getTag() { node->initialize(); if (DebugManager.flags.PrintTimestampPacketUsage.get() == 1) { - printf("\nPID: %u, TSP taken from pool and initialized: 0x%" PRIu64, SysCalls::getProcessId(), node->getGpuAddress()); + printf("\nPID: %u, TSP taken from pool and initialized: 0x%" PRIX64, SysCalls::getProcessId(), node->getGpuAddress()); } return node; @@ -48,7 +48,7 @@ void TagAllocator::returnTagToFreePool(TagNodeBase *node) { DEBUG_BREAK_IF(usedNode == nullptr); if (DebugManager.flags.PrintTimestampPacketUsage.get() == 1) { - printf("\nPID: %u, TSP returned to pool: 0x%" PRIu64, SysCalls::getProcessId(), nodeT->getGpuAddress()); + printf("\nPID: %u, TSP returned to pool: 0x%" PRIX64, SysCalls::getProcessId(), nodeT->getGpuAddress()); } freeTags.pushFrontOne(*nodeT); @@ -72,7 +72,7 @@ void TagAllocator::releaseDeferredTags() { auto nextNode = currentNode->next; if (currentNode->canBeReleased()) { if (DebugManager.flags.PrintTimestampPacketUsage.get() == 1) { - printf("\nPID: %u, TSP returned to pool: 0x%" PRIu64, SysCalls::getProcessId(), currentNode->getGpuAddress()); + printf("\nPID: %u, TSP returned to pool: 0x%" PRIX64, SysCalls::getProcessId(), currentNode->getGpuAddress()); } pendingFreeTags.pushFrontOne(*currentNode); } else {