Reduce shared memory allocation log spam
Shared memory allocation failure is fairly common compared to other
types of failures we encounter. Given the frequency with which this
occurs once the system gets into a bad state, we should not log related
errors in release builds.
Fixed: 1345116
Change-Id: I7a0342097f864d15193aa1ccf98e629eb0954db3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3782280
Auto-Submit: Ken Rockot <rockot@google.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1028429}
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.cc b/gpu/ipc/client/command_buffer_proxy_impl.cc
index a66bc55..efb132e 100644
--- a/gpu/ipc/client/command_buffer_proxy_impl.cc
+++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -93,8 +93,8 @@
std::tie(shared_state_shm_, shared_state_mapping_) =
AllocateAndMapSharedMemory(sizeof(*shared_state()));
if (!shared_state_shm_.IsValid()) {
- LOG(ERROR) << "ContextResult::kFatalFailure: "
- "AllocateAndMapSharedMemory failed";
+ DLOG(ERROR) << "ContextResult::kFatalFailure: "
+ "AllocateAndMapSharedMemory failed";
return ContextResult::kFatalFailure;
}
diff --git a/mojo/core/broker_posix.cc b/mojo/core/broker_posix.cc
index 07a4bc1..6aa7bd7 100644
--- a/mojo/core/broker_posix.cc
+++ b/mojo/core/broker_posix.cc
@@ -43,7 +43,7 @@
LOG(ERROR) << "Invalid node channel message";
error = true;
} else if (incoming_fds.size() != expected_num_handles) {
- LOG(ERROR) << "Received unexpected number of handles";
+ DLOG(ERROR) << "Received unexpected number of handles";
error = true;
}