Skip to content

Commit 603250a

Browse files
Fix aub name generation with PID
Signed-off-by: Bartosz Dunajski <[email protected]>
1 parent 97ceb98 commit 603250a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

opencl/test/unit_test/command_stream/aub_file_stream_tests.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ HWTEST_F(AubFileStreamTests, givenGenerateAubFilePerProcessIdDebugFlagAndAubComm
10081008

10091009
DebugManager.flags.GenerateAubFilePerProcessId.set(1);
10101010
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u);
1011-
std::stringstream strExtendedFileName("_1_aubfile");
1012-
strExtendedFileName << "_PID_" << SysCalls::getProcessId() << ".aub";
1011+
std::stringstream strExtendedFileName;
1012+
strExtendedFileName << "_1_aubfile_PID_" << SysCalls::getProcessId() << ".aub";
10131013
EXPECT_NE(std::string::npos, fullName.find(strExtendedFileName.str()));
10141014
}

shared/source/command_stream/aub_command_stream_receiver.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwI
3636
if (subDevicesCount > 1) {
3737
strfilename << subDevicesCount << "tx";
3838
}
39-
std::stringstream strExtendedFileName(filename.c_str());
39+
std::stringstream strExtendedFileName;
40+
41+
strExtendedFileName << filename;
4042
if (DebugManager.flags.GenerateAubFilePerProcessId.get()) {
41-
strExtendedFileName << "PID_" << SysCalls::getProcessId();
43+
strExtendedFileName << "_PID_" << SysCalls::getProcessId();
4244
}
4345
strfilename << gtSystemInfo.SliceCount << "x" << subSlicesPerSlice << "x" << gtSystemInfo.MaxEuPerSubSlice << "_" << rootDeviceIndex << "_" << strExtendedFileName.str() << ".aub";
4446

0 commit comments

Comments
 (0)