mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
refactor: improve logging by adding size.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ddce122991
commit
7cba813c81
@@ -110,6 +110,7 @@ void FileLogger<debugLevel>::logAllocation(GraphicsAllocation const *graphicsAll
|
||||
ss << " AllocationType: " << getAllocationTypeString(graphicsAllocation);
|
||||
ss << " MemoryPool: " << getMemoryPoolString(graphicsAllocation);
|
||||
ss << " Root device index: " << graphicsAllocation->getRootDeviceIndex();
|
||||
ss << " Size: " << graphicsAllocation->getUnderlyingBufferSize();
|
||||
ss << " GPU address: 0x" << std::hex << graphicsAllocation->getGpuAddress() << " - 0x" << std::hex << graphicsAllocation->getGpuAddress() + graphicsAllocation->getUnderlyingBufferSize() - 1;
|
||||
|
||||
ss << graphicsAllocation->getAllocationInfoString();
|
||||
|
||||
@@ -33,6 +33,7 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagThenLogsCorrectInfo) {
|
||||
allocation.memoryPool = MemoryPool::system64KBPages;
|
||||
allocation.getDefaultGmm()->resourceParams.Flags.Info.NonLocalOnly = 0;
|
||||
allocation.setGpuAddress(0x12345);
|
||||
allocation.size = 777u;
|
||||
|
||||
fileLogger.logAllocation(&allocation);
|
||||
|
||||
@@ -58,6 +59,7 @@ TEST_F(FileLoggerTests, GivenLogAllocationMemoryPoolFlagThenLogsCorrectInfo) {
|
||||
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("Size: 777") != std::string::npos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user