refactor: Debug flag to print TSP usage

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-06-22 11:22:26 +00:00
committed by Compute-Runtime-Automation
parent 0bc5eead84
commit b004a27e4e
5 changed files with 26 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
#pragma once
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/command_stream/csr_deps.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/aux_translation.h"
#include "shared/source/helpers/gfx_core_helper.h"
@@ -95,6 +96,10 @@ struct TimestampPacketHelper {
static void programSemaphore(LinearStream &cmdStream, TagNodeBase &timestampPacketNode) {
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());
}
auto compareAddress = getContextEndGpuAddress(timestampPacketNode);
for (uint32_t packetId = 0; packetId < timestampPacketNode.getPacketsUsed(); packetId++) {