Reduce debug level log from libbufferhub
Logs that indicates possible racing between consumers and producers of
a buffer are removed because they are expected to race each other.
Log that indicates possible racing in bufferhubd is moved from info
level to verbose level.
Test: vega runs without libbufferhub log spam
Bug: 129544259
Change-Id: I9307602797ff9c1bbc774264682a83bf4ddd0240
(cherry picked from commit b9d077f9be584114c39ac8417452cd20817c0236)
diff --git a/libs/vr/libbufferhub/consumer_buffer.cpp b/libs/vr/libbufferhub/consumer_buffer.cpp
index 115e866..7823e36 100644
--- a/libs/vr/libbufferhub/consumer_buffer.cpp
+++ b/libs/vr/libbufferhub/consumer_buffer.cpp
@@ -52,12 +52,6 @@
while (!buffer_state_->compare_exchange_weak(
current_buffer_state, updated_buffer_state, std::memory_order_acq_rel,
std::memory_order_acquire)) {
- ALOGD(
- "%s Failed to acquire the buffer. Current buffer state was changed to "
- "%" PRIx32
- " when trying to acquire the buffer and modify the buffer state to "
- "%" PRIx32 ". About to try again if the buffer is still posted.",
- __FUNCTION__, current_buffer_state, updated_buffer_state);
if (!BufferHubDefs::isClientPosted(current_buffer_state,
client_state_mask())) {
ALOGE(
@@ -152,12 +146,6 @@
while (!buffer_state_->compare_exchange_weak(
current_buffer_state, updated_buffer_state, std::memory_order_acq_rel,
std::memory_order_acquire)) {
- ALOGD(
- "%s: Failed to release the buffer. Current buffer state was changed to "
- "%" PRIx32
- " when trying to release the buffer and modify the buffer state to "
- "%" PRIx32 ". About to try again.",
- __FUNCTION__, current_buffer_state, updated_buffer_state);
// The failure of compare_exchange_weak updates current_buffer_state.
updated_buffer_state = current_buffer_state & (~client_state_mask());
}
diff --git a/libs/vr/libbufferhub/producer_buffer.cpp b/libs/vr/libbufferhub/producer_buffer.cpp
index 3d88ba5..aa9d072 100644
--- a/libs/vr/libbufferhub/producer_buffer.cpp
+++ b/libs/vr/libbufferhub/producer_buffer.cpp
@@ -96,13 +96,6 @@
while (!buffer_state_->compare_exchange_weak(
current_buffer_state, updated_buffer_state, std::memory_order_acq_rel,
std::memory_order_acquire)) {
- ALOGD(
- "%s: Failed to post the buffer. Current buffer state was changed to "
- "%" PRIx32
- " when trying to post the buffer and modify the buffer state to "
- "%" PRIx32
- ". About to try again if the buffer is still gained by this client.",
- __FUNCTION__, current_buffer_state, updated_buffer_state);
if (!BufferHubDefs::isClientGained(current_buffer_state,
client_state_mask())) {
ALOGE(
@@ -186,15 +179,6 @@
while (!buffer_state_->compare_exchange_weak(
current_buffer_state, updated_buffer_state, std::memory_order_acq_rel,
std::memory_order_acquire)) {
- ALOGD(
- "%s: Failed to gain the buffer. Current buffer state was changed to "
- "%" PRIx32
- " when trying to gain the buffer and modify the buffer state to "
- "%" PRIx32
- ". About to try again if the buffer is still not read by other "
- "clients.",
- __FUNCTION__, current_buffer_state, updated_buffer_state);
-
if (BufferHubDefs::isAnyClientAcquired(current_buffer_state) ||
BufferHubDefs::isAnyClientGained(current_buffer_state) ||
(BufferHubDefs::isAnyClientPosted(
diff --git a/services/vr/bufferhubd/producer_channel.cpp b/services/vr/bufferhubd/producer_channel.cpp
index a7fd912..b71964b 100644
--- a/services/vr/bufferhubd/producer_channel.cpp
+++ b/services/vr/bufferhubd/producer_channel.cpp
@@ -350,7 +350,7 @@
while (!buffer_state_->compare_exchange_weak(
current_buffer_state, updated_buffer_state, std::memory_order_acq_rel,
std::memory_order_acquire)) {
- ALOGI(
+ ALOGV(
"%s: Failed to post to the new consumer. "
"Current buffer state was changed to %" PRIx32
" when trying to acquire the buffer and modify the buffer state to "