refactor: improve ulls prints

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski 2024-08-07 12:44:39 +00:00 committed by Compute-Runtime-Automation
parent 0d6c506c0b
commit 7fc7fbfc47
2 changed files with 12 additions and 2 deletions

View File

@ -665,6 +665,7 @@ void DirectSubmissionHw<GfxFamily, Dispatcher>::updateRelaxedOrderingQueueSize(u
template <typename GfxFamily, typename Dispatcher>
void *DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchWorkloadSection(BatchBuffer &batchBuffer, bool dispatchMonitorFence) {
void *currentPosition = ringCommandStream.getSpace(0);
auto copyCmdBuffer = this->copyCommandBufferIntoRing(batchBuffer);
if (debugManager.flags.DirectSubmissionPrintBuffers.get()) {
printf("Client buffer:\n");
@ -681,6 +682,15 @@ void *DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchWorkloadSection(BatchBu
ptrOffset(batchBuffer.commandBufferAllocation->getUnderlyingBuffer(), batchBuffer.usedSize),
batchBuffer.startOffset,
batchBuffer.usedSize);
printf("Ring buffer for submission - start gpu address: %" PRIx64 " - %" PRIx64 ", start cpu address: %p - %p, size: %zu, submission address: %" PRIx64 ", used size: %zu, copyCmdBuffer: %d \n",
ringCommandStream.getGraphicsAllocation()->getGpuAddress(),
ptrOffset(ringCommandStream.getGraphicsAllocation()->getGpuAddress(), ringCommandStream.getGraphicsAllocation()->getUnderlyingBufferSize()),
ringCommandStream.getGraphicsAllocation()->getUnderlyingBuffer(),
ptrOffset(ringCommandStream.getGraphicsAllocation()->getUnderlyingBuffer(), ringCommandStream.getGraphicsAllocation()->getUnderlyingBufferSize()),
ringCommandStream.getGraphicsAllocation()->getUnderlyingBufferSize(),
ptrOffset(ringCommandStream.getGraphicsAllocation()->getGpuAddress(), ringCommandStream.getUsed()),
ringCommandStream.getUsed(),
copyCmdBuffer);
}
if (!batchBuffer.pagingFenceSemInfo.requiresBlockingResidencyHandling) {
@ -698,8 +708,6 @@ void *DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchWorkloadSection(BatchBu
relaxedOrderingReturnPtrCmdStream.replaceBuffer(relaxedOrderingReturnPtrCmds, RelaxedOrderingHelper::getSizeReturnPtrRegs<GfxFamily>());
}
auto copyCmdBuffer = this->copyCommandBufferIntoRing(batchBuffer);
if (copyCmdBuffer) {
auto cmdStreamTaskPtr = ptrOffset(batchBuffer.stream->getCpuBase(), batchBuffer.startOffset);
auto sizeToCopy = ptrDiff(returnCmd, cmdStreamTaskPtr);

View File

@ -783,6 +783,8 @@ HWTEST_F(DirectSubmissionDispatchBufferTest, givenDirectSubmissionPrintBuffersWh
EXPECT_TRUE(pos != std::string::npos);
pos = output.find("Client buffer");
EXPECT_TRUE(pos != std::string::npos);
pos = output.find("Ring buffer for submission");
EXPECT_TRUE(pos != std::string::npos);
}
HWCMDTEST_F(IGFX_XE_HP_CORE, DirectSubmissionDispatchBufferTest,