fix: Remove old aub_mem_dump logic and related tests

Related-To: NEO-14718

Signed-off-by: Aleksandra Nizio <aleksandra.nizio@intel.com>
This commit is contained in:
Aleksandra Nizio 2025-05-12 14:53:41 +00:00 committed by Compute-Runtime-Automation
parent c703983110
commit fa1e3fd6a2
26 changed files with 343 additions and 401 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Intel Corporation
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -13,10 +13,7 @@
#include "opencl/test/unit_test/api/cl_api_tests.h"
using namespace NEO;
namespace AubMemDump {
#include "aub_services.h"
}
TEST(CheckVerifyMemoryRelatedApiConstants, givenVerifyMemoryRelatedApiConstantsWhenVerifyingTheirValueThenCorrectValuesAreReturned) {
EXPECT_EQ(AubMemDump::CmdServicesMemTraceMemoryCompare::CompareOperationValues::CompareEqual, CL_MEM_COMPARE_EQUAL);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -14,7 +14,7 @@
#else
#pragma pack(push, 4)
#endif
namespace AubMemDump {
inline void setMisalignedUint64(uint64_t *address, const uint64_t value) {
uint32_t *addressBits = reinterpret_cast<uint32_t *>(address);
addressBits[0] = static_cast<uint32_t>(value);
@ -62,7 +62,6 @@ struct AubCmdDumpBmpHd {
}
};
static_assert(44 == sizeof(AubCmdDumpBmpHd), "Invalid size for AubCmdDumpBmpHd");
struct AubPpgttContextCreate {
AubCmdHdr header;
uint32_t handle;
@ -112,7 +111,7 @@ struct AubCaptureBinaryDumpHD {
}
};
static_assert(56 == sizeof(AubCaptureBinaryDumpHD), "Invalid size for AubCaptureBinaryDumpHD");
} // namespace AubMemDump
#ifndef WIN32
#pragma pack()
#else

View File

@ -9,16 +9,14 @@
#include "shared/source/aub_mem_dump/aub_data.h"
#include <fstream>
#include <mutex>
#include <string>
namespace NEO {
class AubHelper;
}
namespace AubMemDump {
#include "aub_services.h"
namespace AubMemDump {
inline constexpr uint32_t rcsRegisterBase = 0x2000;
#ifndef BIT
@ -137,11 +135,9 @@ struct AubFileStream : public AubStream {
MOCKABLE_VIRTUAL void expectMemory(uint64_t physAddress, const void *memory, size_t size,
uint32_t addressSpace, uint32_t compareOperation);
MOCKABLE_VIRTUAL bool addComment(const char *message);
[[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock<std::mutex> lockStream();
std::ofstream fileHandle;
std::string fileName;
std::mutex mutex;
};
template <int addressingBits>

View File

@ -16,7 +16,7 @@
#else
#pragma pack(push, 4)
#endif
namespace AubMemDump {
struct CmdServicesMemTraceVersion {
union {
AubCmdHdr header;
@ -1445,6 +1445,7 @@ struct CmdServicesMemTraceDumpCompress {
TrmodeYs = 2 };
};
};
} // namespace AubMemDump
#ifndef WIN32
#pragma pack()
#else

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -8,6 +8,7 @@
#include "shared/source/command_stream/aub_command_stream_receiver.h"
#include "shared/source/aub/aub_helper.h"
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
@ -300,9 +301,4 @@ bool AubFileStream::addComment(const char *message) {
}
return true;
}
std::unique_lock<std::mutex> AubFileStream::lockStream() {
return std::unique_lock<std::mutex>(mutex);
}
} // namespace AubMemDump

View File

@ -9,6 +9,8 @@
#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h"
#include "shared/source/memory_manager/residency_container.h"
#include <mutex>
namespace NEO {
class PDPE;
class PML4;
@ -106,6 +108,12 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
int getAddressSpaceFromPTEBits(uint64_t entryBits) const;
std::mutex mutex;
[[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock<std::mutex> lockStream() {
return std::unique_lock<std::mutex>(mutex);
}
protected:
constexpr static uint32_t getMaskAndValueForPollForCompletion();

View File

@ -104,13 +104,13 @@ AUBCommandStreamReceiverHw<GfxFamily>::~AUBCommandStreamReceiverHw() {
template <typename GfxFamily>
void AUBCommandStreamReceiverHw<GfxFamily>::openFile(const std::string &fileName) {
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
initFile(fileName);
}
template <typename GfxFamily>
bool AUBCommandStreamReceiverHw<GfxFamily>::reopenFile(const std::string &fileName) {
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (isFileOpen()) {
if (fileName != getFileName()) {
@ -182,7 +182,7 @@ const std::string AUBCommandStreamReceiverHw<GfxFamily>::getFileName() {
template <typename GfxFamily>
void AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine() {
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
isEngineInitialized = true;
if (hardwareContextController) {
@ -426,7 +426,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::addPatchInfoComments() {
template <typename GfxFamily>
void AUBCommandStreamReceiverHw<GfxFamily>::submitBatchBufferAub(uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits) {
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (hardwareContextController) {
if (batchBufferSize) {
@ -602,7 +602,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::pollForCompletionImpl() {
}
}
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (hardwareContextController) {
hardwareContextController->pollForCompletion();
@ -682,7 +682,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
return false;
}
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (aubManager) {
this->writeMemoryWithAubManager(gfxAllocation, isChunkCopy, gpuVaChunkOffset, chunkSize);
@ -712,7 +712,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(AllocationView &allocati
template <typename GfxFamily>
void AUBCommandStreamReceiverHw<GfxFamily>::writeMMIO(uint32_t offset, uint32_t value) {
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (hardwareContextController) {
hardwareContextController->writeMMIO(offset, value);
@ -733,7 +733,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::expectMemory(const void *gfxAddress,
size_t length, uint32_t compareOperation) {
pollForCompletion();
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (hardwareContextController) {
hardwareContextController->expectMemory(reinterpret_cast<uint64_t>(gfxAddress), srcAddress, length, compareOperation);
@ -807,7 +807,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::dumpAllocation(GraphicsAllocation &g
pollForCompletion();
}
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (hardwareContextController) {
auto surfaceInfo = std::unique_ptr<aub_stream::SurfaceInfo>(AubAllocDump::getDumpSurfaceInfo<GfxFamily>(gfxAllocation, *this->peekGmmHelper(), dumpFormat));
@ -838,11 +838,12 @@ AubSubCaptureStatus AUBCommandStreamReceiverHw<GfxFamily>::checkAndActivateAubSu
template <typename GfxFamily>
void AUBCommandStreamReceiverHw<GfxFamily>::addAubComment(const char *message) {
auto streamLocked = getAubStream()->lockStream();
auto streamLocked = lockStream();
if (aubManager) {
aubManager->addComment(message);
return;
}
getAubStream()->addComment(message);
}

View File

@ -42,13 +42,11 @@
#include "shared/source/utilities/tag_allocator.h"
#include "shared/source/utilities/wait_util.h"
#include "aub_services.h"
#include <array>
#include <iostream>
namespace AubMemDump {
#include "aub_services.h"
}
namespace NEO {
// Global table of CommandStreamReceiver factories for HW and tests

View File

@ -33,46 +33,46 @@ const PLATFORM ADLN::platform = {
const RuntimeCapabilityTable ADLN::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Adln, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(ADLN::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Adln, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(ADLN::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
};
WorkaroundTable ADLN::workaroundTable = {};

View File

@ -33,46 +33,46 @@ const PLATFORM ADLP::platform = {
const RuntimeCapabilityTable ADLP::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Adlp, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(ADLP::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Adlp, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(ADLP::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
};
WorkaroundTable ADLP::workaroundTable = {};

View File

@ -33,46 +33,46 @@ const PLATFORM ADLS::platform = {
const RuntimeCapabilityTable ADLS::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Adls, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(ADLS::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Adls, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(ADLS::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
};
WorkaroundTable ADLS::workaroundTable = {};

View File

@ -33,46 +33,46 @@ const PLATFORM DG1::platform = {
const RuntimeCapabilityTable DG1::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Dg1, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(DG1::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
true, // supportCacheFlushAfterWalker
true, // supportsImages,
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
false, // isIntegratedDevice
true, // supportsMediaBlock
true, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
true, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Dg1, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(DG1::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
true, // supportCacheFlushAfterWalker
true, // supportsImages,
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
false, // isIntegratedDevice
true, // supportsMediaBlock
true, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
true, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
};
WorkaroundTable DG1::workaroundTable = {};

View File

@ -33,46 +33,46 @@ const PLATFORM RKL::platform = {
const RuntimeCapabilityTable RKL::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Tgllp, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(RKL::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Tgllp, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(RKL::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
};
WorkaroundTable RKL::workaroundTable = {};

View File

@ -33,46 +33,46 @@ const PLATFORM TGLLP::platform = {
const RuntimeCapabilityTable TGLLP::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Tgllp, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(TGLLP::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Tgllp, // aubDeviceId
1, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(TGLLP::GRF), // grfSize
36u, // timestampValidBits
32u, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
false, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
false, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
false, // supportsOnDemandPageFaults
false, // supportsIndependentForwardProgress
true, // isIntegratedDevice
true, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
true, // fusedEuEnabled
false, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
};
WorkaroundTable TGLLP::workaroundTable = {};

View File

@ -36,46 +36,46 @@ const RuntimeCapabilityTable BMG::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_CCS, {true, false, false, true}},
{aub_stream::ENGINE_CCS1, {true, false, true, true}},
{aub_stream::ENGINE_BCS, {true, false, true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Bmg, // aubDeviceId
0, // extraQuantityThreadsPerEU
128, // maxProgrammableSlmSize
sizeof(BMG::GRF), // grfSize
64, // timestampValidBits
64, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
true, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
true, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
true, // supportsOnDemandPageFaults
true, // supportsIndependentForwardProgress
false, // isIntegratedDevice
false, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
false, // fusedEuEnabled
true, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
{aub_stream::ENGINE_BCS, {true, false, true, true}}}, // directSubmissionEngines
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
"", // deviceName
nullptr, // preferredPlatformName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Bmg, // aubDeviceId
0, // extraQuantityThreadsPerEU
128, // maxProgrammableSlmSize
sizeof(BMG::GRF), // grfSize
64, // timestampValidBits
64, // kernelTimestampValidBits
false, // blitterOperationsSupported
true, // ftrSupportsInteger64BitAtomics
true, // ftrSupportsFP64
false, // ftrSupportsFP64Emulation
true, // ftrSupports64BitMath
false, // ftrSupportsCoherency
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
false, // supportCacheFlushAfterWalker
true, // supportsImages
true, // supportsOcl21Features
true, // supportsOnDemandPageFaults
true, // supportsIndependentForwardProgress
false, // isIntegratedDevice
false, // supportsMediaBlock
false, // p2pAccessSupported
false, // p2pAtomicAccessSupported
false, // fusedEuEnabled
true, // l0DebuggerSupported;
true, // supportsFloatAtomics
0 // cxlType
};
void BMG::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {

View File

@ -45,7 +45,7 @@ const RuntimeCapabilityTable LNL::capabilityTable{
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Lnl, // aubDeviceId
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Lnl, // aubDeviceId
0, // extraQuantityThreadsPerEU
128, // maxProgrammableSlmSize
sizeof(LNL::GRF), // grfSize

View File

@ -45,7 +45,7 @@ const RuntimeCapabilityTable PTL::capabilityTable{
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Ptl, // aubDeviceId
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Ptl, // aubDeviceId
0, // extraQuantityThreadsPerEU
128, // maxProgrammableSlmSize
sizeof(PTL::GRF), // grfSize

View File

@ -57,7 +57,7 @@ const RuntimeCapabilityTable PVC::capabilityTable{
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Pvc, // aubDeviceId
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Pvc, // aubDeviceId
0, // extraQuantityThreadsPerEU
128, // maxProgrammableSlmSize
sizeof(PVC::GRF), // grfSize

View File

@ -42,7 +42,7 @@ const RuntimeCapabilityTable ARL::capabilityTable{
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Arl, // aubDeviceId
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Arl, // aubDeviceId
0, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(ARL::GRF), // grfSize

View File

@ -47,7 +47,7 @@ const RuntimeCapabilityTable DG2::capabilityTable{
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Dg2, // aubDeviceId
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Dg2, // aubDeviceId
0, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(DG2::GRF), // grfSize

View File

@ -43,7 +43,7 @@ const RuntimeCapabilityTable MTL::capabilityTable{
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
30, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Mtl, // aubDeviceId
AubMemDump::CmdServicesMemTraceVersion::DeviceValues::Mtl, // aubDeviceId
0, // extraQuantityThreadsPerEU
64, // maxProgrammableSlmSize
sizeof(MTL::GRF), // grfSize

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -12,15 +12,6 @@
#include "shared/test/common/mocks/mock_aub_file_stream.h"
namespace NEO {
class MockAubStreamProvider : public AubStreamProvider {
public:
AubMemDump::AubFileStream *getStream() override {
return &stream;
}
protected:
MockAubFileStream stream;
};
class MockAubCenter : public AubCenter {
public:
@ -30,7 +21,6 @@ class MockAubCenter : public AubCenter {
using AubCenter::stepping;
MockAubCenter() {
streamProvider.reset(new MockAubStreamProvider());
}
~MockAubCenter() override = default;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -172,7 +172,12 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
bool addAubCommentCalled = false;
bool dumpAllocationCalled = false;
bool skipTaskCountCheckForCompletionPoll = false;
bool lockStreamCalled = false;
std::unique_lock<std::mutex> lockStream() override {
lockStreamCalled = true;
return AUBCommandStreamReceiverHw<GfxFamily>::lockStream();
}
void initFile(const std::string &fileName) override {
fileIsOpen = true;
openFileName = fileName;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -12,7 +12,6 @@
#include <vector>
namespace NEO {
struct MockAubFileStream : public AUBCommandStreamReceiver::AubFileStream {
bool init(uint32_t stepping, uint32_t device) override {
initCalledCnt++;
@ -37,10 +36,6 @@ struct MockAubFileStream : public AUBCommandStreamReceiver::AubFileStream {
void flush() override {
flushCalled = true;
}
std::unique_lock<std::mutex> lockStream() override {
lockStreamCalled = true;
return AUBCommandStreamReceiver::AubFileStream::lockStream();
}
void expectMMIO(uint32_t mmioRegister, uint32_t expectedValue) override {
mmioRegisterFromExpectMMIO = mmioRegister;
expectedValueFromExpectMMIO = expectedValue;

View File

@ -163,126 +163,95 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithAubManagerWhenFile
}
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenOpenFileIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
auto aubCsr = std::make_unique<MockAubCsr<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::string fileName = "file_name.aub";
aubCsr->stream = mockAubFileStream.get();
aubCsr->openFile(fileName);
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenReopenFileIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
auto aubCsr = std::make_unique<MockAubCsr<FamilyType>>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::string fileName = "file_name.aub";
aubCsr->stream = mockAubFileStream.get();
aubCsr->reopenFile(fileName);
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenInitializeEngineIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubExecutionEnvironment = getEnvironment<AUBCommandStreamReceiverHw<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<AUBCommandStreamReceiverHw<FamilyType>>();
aubCsr->stream = static_cast<MockAubFileStream *>(mockAubFileStream.get());
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
aubCsr->initializeEngine();
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenSubmitBatchBufferIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubExecutionEnvironment = getEnvironment<AUBCommandStreamReceiverHw<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<AUBCommandStreamReceiverHw<FamilyType>>();
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
LinearStream cs(aubExecutionEnvironment->commandBuffer);
BatchBuffer batchBuffer = BatchBufferHelper::createDefaultBatchBuffer(cs.getGraphicsAllocation(), &cs, cs.getUsed());
aubCsr->stream = static_cast<MockAubFileStream *>(mockAubFileStream.get());
auto pBatchBuffer = ptrOffset(batchBuffer.commandBufferAllocation->getUnderlyingBuffer(), batchBuffer.startOffset);
auto batchBufferGpuAddress = ptrOffset(batchBuffer.commandBufferAllocation->getGpuAddress(), batchBuffer.startOffset);
auto currentOffset = batchBuffer.usedSize;
auto sizeBatchBuffer = currentOffset - batchBuffer.startOffset;
aubCsr->initializeEngine();
mockAubFileStream->lockStreamCalled = false;
aubCsr->lockStreamCalled = false;
aubCsr->submitBatchBufferAub(batchBufferGpuAddress, pBatchBuffer, sizeBatchBuffer, aubCsr->getMemoryBank(batchBuffer.commandBufferAllocation),
aubCsr->getPPGTTAdditionalBits(batchBuffer.commandBufferAllocation));
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenWriteMemoryIsCalledThenFileStreamShouldBeLocked) {
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubExecutionEnvironment = getEnvironment<AUBCommandStreamReceiverHw<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<AUBCommandStreamReceiverHw<FamilyType>>();
aubCsr->initializeEngine();
aubCsr->stream = static_cast<MockAubFileStream *>(mockAubFileStream.get());
MockGraphicsAllocation allocation(reinterpret_cast<void *>(0x1000), 0x1000);
aubCsr->writeMemory(allocation);
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenPollForCompletionIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
aubCsr->stream = static_cast<MockAubFileStream *>(mockAubFileStream.get());
aubCsr->latestSentTaskCount = 1;
aubCsr->pollForCompletionTaskCount = 0;
aubCsr->pollForCompletion();
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenExpectMemoryEqualIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
aubCsr->stream = static_cast<MockAubFileStream *>(mockAubFileStream.get());
aubCsr->expectMemoryEqual(reinterpret_cast<void *>(0x1000), reinterpret_cast<void *>(0x1000), 0x1000);
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenAddAubCommentIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
aubCsr->stream = static_cast<MockAubFileStream *>(mockAubFileStream.get());
aubCsr->addAubComment("comment");
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamWithoutAubStreamTests, givenAubCommandStreamReceiverWhenDumpAllocationIsCalledThenFileStreamShouldBeLocked) {
auto mockAubFileStream = std::make_unique<MockAubFileStream>();
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
GraphicsAllocation allocation{0, 1u /*num gmms*/, AllocationType::unknown, nullptr, 0, 0, 0, MemoryPool::memoryNull, MemoryManager::maxOsContextCount};
aubCsr->stream = static_cast<MockAubFileStream *>(mockAubFileStream.get());
aubCsr->dumpAllocation(allocation);
EXPECT_TRUE(mockAubFileStream->lockStreamCalled);
EXPECT_TRUE(aubCsr->lockStreamCalled);
}
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenItShouldCallTheExpectedFunctions) {

View File

@ -531,19 +531,6 @@ HWTEST_F(SimulatedCsrTest, givenTbxWithAubDumpCsrTypeWhenCreateCommandStreamRece
EXPECT_NE(nullptr, rootDeviceEnvironment->aubCenter.get());
}
HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenNullAubManagerAvailableWhenTbxCsrWithAubDumpIsCreatedThenAubCsrIsCreated) {
DebugManagerStateRestore stateRestore;
debugManager.flags.UseAubStream.set(false);
MockAubCenter *mockAubCenter = new MockAubCenter();
ExecutionEnvironment *executionEnvironment = pDevice->getExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
DeviceBitfield deviceBitfield(1);
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0, deviceBitfield);
EXPECT_NE(nullptr, csrWithAubDump.aubCSR);
}
HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerNotAvailableWhenHwCsrWithAubDumpIsCreatedThenAubCsrIsCreated) {
std::string fileName = "file_name.aub";