Skip to content

Commit 8260e7c

Browse files
Improve logging.
Change-Id: I4ca07fe6597fb72ffbd6c42d459415fe83658640
1 parent c7ec23c commit 8260e7c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

opencl/test/unit_test/os_interface/linux/drm_buffer_object_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ TEST_F(DrmBufferObjectTest, givenResidentBOWhenPrintExecutionBufferIsSetToTrueTh
169169
size_t expectedValue = 0;
170170
EXPECT_EQ(expectedValue, idx);
171171

172-
idx = output.find("Buffer Object = { handle: ");
172+
idx = output.find("Buffer Object = { handle: BO-");
173173
EXPECT_NE(std::string::npos, idx);
174174

175-
idx = output.find("Command Buffer Object = { handle: ");
175+
idx = output.find("Command Buffer Object = { handle: BO-");
176176
EXPECT_NE(std::string::npos, idx);
177177
}
178178

@@ -186,7 +186,7 @@ TEST_F(DrmBufferObjectTest, whenPrintBOCreateDestroyResultFlagIsSetAndCloseIsCal
186186
EXPECT_EQ(true, result);
187187

188188
std::string output = testing::internal::GetCapturedStdout();
189-
size_t idx = output.find("Calling gem close on BO handle");
189+
size_t idx = output.find("Calling gem close on handle: BO-");
190190
size_t expectedValue = 0;
191191
EXPECT_EQ(expectedValue, idx);
192192
}

opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ TEST_F(DrmMemoryManagerTest, whenPrintBOCreateDestroyResultIsSetAndAllocUserptrI
476476
ASSERT_NE(nullptr, bo);
477477

478478
std::string output = testing::internal::GetCapturedStdout();
479-
size_t idx = output.find("Created new BO with GEM_USERPTR, BO handle - ");
479+
size_t idx = output.find("Created new BO with GEM_USERPTR, handle: BO-");
480480
size_t expectedValue = 0;
481481
EXPECT_EQ(expectedValue, idx);
482482

shared/source/os_interface/linux/drm_buffer_object.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool BufferObject::close() {
6161
drm_gem_close close = {};
6262
close.handle = this->handle;
6363

64-
printDebugString(DebugManager.flags.PrintBOCreateDestroyResult.get(), stdout, "Calling gem close on BO handle %d\n", this->handle);
64+
printDebugString(DebugManager.flags.PrintBOCreateDestroyResult.get(), stdout, "Calling gem close on handle: BO-%d\n", this->handle);
6565

6666
int ret = this->drm->ioctl(DRM_IOCTL_GEM_CLOSE, &close);
6767
if (ret != 0) {
@@ -186,13 +186,13 @@ void BufferObject::printExecutionBuffer(drm_i915_gem_execbuffer2 &execbuf, const
186186

187187
size_t i;
188188
for (i = 0; i < residencyCount; i++) {
189-
logger << "Buffer Object = { handle: " << execObjectsStorage[i].handle
189+
logger << "Buffer Object = { handle: BO-" << execObjectsStorage[i].handle
190190
<< ", address range: 0x" << (void *)execObjectsStorage[i].offset
191191
<< " - 0x" << (void *)ptrOffset(execObjectsStorage[i].offset, residency[i]->peekSize())
192192
<< ", flags: " << execObjectsStorage[i].flags
193193
<< ", size: " << residency[i]->peekSize() << " }\n";
194194
}
195-
logger << "Command Buffer Object = { handle: " << execObjectsStorage[i].handle
195+
logger << "Command Buffer Object = { handle: BO-" << execObjectsStorage[i].handle
196196
<< ", address range: 0x" << (void *)execObjectsStorage[i].offset
197197
<< " - 0x" << (void *)ptrOffset(execObjectsStorage[i].offset, this->peekSize())
198198
<< ", flags: " << execObjectsStorage[i].flags

shared/source/os_interface/linux/drm_memory_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ NEO::BufferObject *DrmMemoryManager::allocUserptr(uintptr_t address, size_t size
177177
return nullptr;
178178
}
179179

180-
printDebugString(DebugManager.flags.PrintBOCreateDestroyResult.get(), stdout, "Created new BO with GEM_USERPTR, BO handle - %d\n", userptr.handle);
180+
printDebugString(DebugManager.flags.PrintBOCreateDestroyResult.get(), stdout, "Created new BO with GEM_USERPTR, handle: BO-%d\n", userptr.handle);
181181

182182
auto res = new (std::nothrow) BufferObject(&getDrm(rootDeviceIndex), userptr.handle, size, maxOsContextCount);
183183
if (!res) {

0 commit comments

Comments
 (0)