Commit e63928b6 authored by Daniele Castagna's avatar Daniele Castagna Committed by Commit Bot

gfx: Clean up dmabuf mmap debug logs.

In order to debug dmabuf mmap failures, we added all parameters
to the logs.
Since dmabufs mmap issues have been addressed, this CL removes
mmap parameters from the ERROR log.

Bug: 629521
Change-Id: I09ea05956a60bdac53cd775534c979c5a7f82f95
Reviewed-on: https://chromium-review.googlesource.com/822814Reviewed-by: default avatarDavid Reveman <reveman@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523511}
parent b73890f6
......@@ -85,24 +85,8 @@ ClientNativePixmapDmaBuf::ClientNativePixmapDmaBuf(
if (mmap_error == ENOMEM)
base::TerminateBecauseOutOfMemory(map_size);
bool fd_valid = fcntl(dmabuf_fd_.get(), F_GETFD) != -1 ||
logging::GetLastSystemErrorCode() != EBADF;
std::string mmap_params = base::StringPrintf(
"(addr=nullptr, length=%zu, prot=(PROT_READ | PROT_WRITE), "
"flags=MAP_SHARED, fd=%d[valid=%d], offset=0)",
map_size, dmabuf_fd_.get(), fd_valid);
std::string errno_str = logging::SystemErrorCodeToString(mmap_error);
LOG(ERROR) << "Failed to mmap dmabuf; mmap_params: " << mmap_params
<< ", buffer_size: (" << size.ToString()
<< "), errno: " << errno_str;
LOG(ERROR) << "NativePixmapHandle:";
LOG(ERROR) << "Number of fds: " << handle.fds.size();
LOG(ERROR) << "Number of planes: " << handle.planes.size();
for (const auto& plane : handle.planes) {
LOG(ERROR) << "stride " << plane.stride << " offset " << plane.offset
<< " size " << plane.size;
}
CHECK(false) << "Failed to mmap dmabuf.";
CHECK(false) << "Failed to mmap dmabuf: "
<< logging::SystemErrorCodeToString(mmap_error);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment