Log root device index when logging allocations
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
120b3244dc
commit
5de0a7140a
|
@ -97,6 +97,7 @@ void FileLogger<DebugLevel>::logAllocation(GraphicsAllocation const *graphicsAll
|
|||
ss << " ThreadID: " << thisThread;
|
||||
ss << " AllocationType: " << getAllocationTypeString(graphicsAllocation);
|
||||
ss << " MemoryPool: " << graphicsAllocation->getMemoryPool();
|
||||
ss << " Root device index: " << graphicsAllocation->getRootDeviceIndex();
|
||||
ss << " GPU address: 0x" << std::hex << graphicsAllocation->getGpuAddress();
|
||||
ss << graphicsAllocation->getAllocationInfoString();
|
||||
ss << std::endl;
|
||||
|
|
|
@ -49,11 +49,15 @@ TEST(FileLogger, GivenLogAllocationMemoryPoolFlagThenLogsCorrectInfo) {
|
|||
std::stringstream gpuAddressCheck;
|
||||
gpuAddressCheck << " GPU address: 0x" << std::hex << allocation.getGpuAddress();
|
||||
|
||||
std::stringstream rootDeviceIndexCheck;
|
||||
rootDeviceIndexCheck << " Root device index: " << allocation.getRootDeviceIndex();
|
||||
|
||||
if (fileLogger.wasFileCreated(fileLogger.getLogFileName())) {
|
||||
auto str = fileLogger.getFileString(fileLogger.getLogFileName());
|
||||
EXPECT_TRUE(str.find(threadIDCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find(memoryPoolCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find(gpuAddressCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find(rootDeviceIndexCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find("AllocationType: BUFFER") != std::string::npos);
|
||||
EXPECT_TRUE(str.find("Handle: 4") != std::string::npos);
|
||||
}
|
||||
|
|
|
@ -48,12 +48,16 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagThenLogsCorrectInfo) {
|
|||
std::stringstream gpuAddressCheck;
|
||||
gpuAddressCheck << " GPU address: 0x" << std::hex << allocation.getGpuAddress();
|
||||
|
||||
std::stringstream rootDeviceIndexCheck;
|
||||
rootDeviceIndexCheck << " Root device index: " << allocation.getRootDeviceIndex();
|
||||
|
||||
if (fileLogger.wasFileCreated(fileLogger.getLogFileName())) {
|
||||
auto str = fileLogger.getFileString(fileLogger.getLogFileName());
|
||||
EXPECT_TRUE(str.find(threadIDCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find("Handle: 4") != std::string::npos);
|
||||
EXPECT_TRUE(str.find(memoryPoolCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find(gpuAddressCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find(rootDeviceIndexCheck.str()) != std::string::npos);
|
||||
EXPECT_TRUE(str.find("AllocationType: BUFFER") != std::string::npos);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue