Fix aub name generation with PID

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-09-17 11:31:08 +00:00
committed by Compute-Runtime-Automation
parent 97ceb98a3a
commit 603250a5f0
2 changed files with 6 additions and 4 deletions

View File

@@ -1008,7 +1008,7 @@ HWTEST_F(AubFileStreamTests, givenGenerateAubFilePerProcessIdDebugFlagAndAubComm
DebugManager.flags.GenerateAubFilePerProcessId.set(1);
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u);
std::stringstream strExtendedFileName("_1_aubfile");
strExtendedFileName << "_PID_" << SysCalls::getProcessId() << ".aub";
std::stringstream strExtendedFileName;
strExtendedFileName << "_1_aubfile_PID_" << SysCalls::getProcessId() << ".aub";
EXPECT_NE(std::string::npos, fullName.find(strExtendedFileName.str()));
}

View File

@@ -36,9 +36,11 @@ std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwI
if (subDevicesCount > 1) {
strfilename << subDevicesCount << "tx";
}
std::stringstream strExtendedFileName(filename.c_str());
std::stringstream strExtendedFileName;
strExtendedFileName << filename;
if (DebugManager.flags.GenerateAubFilePerProcessId.get()) {
strExtendedFileName << "PID_" << SysCalls::getProcessId();
strExtendedFileName << "_PID_" << SysCalls::getProcessId();
}
strfilename << gtSystemInfo.SliceCount << "x" << subSlicesPerSlice << "x" << gtSystemInfo.MaxEuPerSubSlice << "_" << rootDeviceIndex << "_" << strExtendedFileName.str() << ".aub";