OSDN Git Service

libvrflinger: Move some tracing to a more verbose level.
authorCorey Tabaka <eieio@google.com>
Tue, 6 Jun 2017 23:14:21 +0000 (16:14 -0700)
committerCorey Tabaka <eieio@google.com>
Wed, 7 Jun 2017 01:30:28 +0000 (18:30 -0700)
Quiet the logs when using TRACE=1.

Bug: None
Test: Set TRACE=1; build; observe traces do not appear.
Change-Id: I521fa5cf4b0ab18e73f89a1898bf2d58fc2d1f88

libs/vr/libvrflinger/display_surface.cpp
libs/vr/libvrflinger/epoll_event_dispatcher.cpp
libs/vr/libvrflinger/hardware_composer.cpp
libs/vr/libvrflinger/vsync_service.cpp

index 2a938a2..330b455 100644 (file)
@@ -127,7 +127,8 @@ void DisplaySurface::SurfaceUpdated(display::SurfaceUpdateFlags update_flags) {
 }
 
 void DisplaySurface::ClearUpdate() {
-  ALOGD_IF(TRACE, "DisplaySurface::ClearUpdate: surface_id=%d", surface_id());
+  ALOGD_IF(TRACE > 1, "DisplaySurface::ClearUpdate: surface_id=%d",
+           surface_id());
   update_flags_ = display::SurfaceUpdateFlags::None;
 }
 
@@ -333,7 +334,7 @@ void DirectDisplaySurface::DequeueBuffersLocked() {
     auto buffer_status = direct_queue_->Dequeue(0, &slot, &acquire_fence);
     if (!buffer_status) {
       ALOGD_IF(
-          TRACE && buffer_status.error() == ETIMEDOUT,
+          TRACE > 1 && buffer_status.error() == ETIMEDOUT,
           "DirectDisplaySurface::DequeueBuffersLocked: All buffers dequeued.");
       ALOGE_IF(buffer_status.error() != ETIMEDOUT,
                "DirectDisplaySurface::DequeueBuffersLocked: Failed to dequeue "
index 06b69bb..962c745 100644 (file)
@@ -101,12 +101,12 @@ void EpollEventDispatcher::EventThread() {
     if (num_events < 0 && errno != EINTR)
       break;
 
-    ALOGD_IF(TRACE, "EpollEventDispatcher::EventThread: num_events=%d",
+    ALOGD_IF(TRACE > 1, "EpollEventDispatcher::EventThread: num_events=%d",
              num_events);
 
     for (int i = 0; i < num_events; i++) {
       ALOGD_IF(
-          TRACE,
+          TRACE > 1,
           "EpollEventDispatcher::EventThread: event %d: handler=%p events=0x%x",
           i, events[i].data.ptr, events[i].events);
 
index 9a9054d..599017f 100644 (file)
@@ -429,7 +429,7 @@ void HardwareComposer::PostLayers() {
     ATRACE_INT("frame_skip_count", 0);
   }
 
-#if TRACE
+#if TRACE > 1
   for (size_t i = 0; i < active_layer_count_; i++) {
     ALOGI("HardwareComposer::PostLayers: layer=%zu buffer_id=%d composition=%s",
           i, layers_[i].GetBufferId(),
index 2a83933..3098b43 100644 (file)
@@ -200,12 +200,12 @@ pdx::Status<int64_t> VSyncWaiter::OnWait(pdx::Message& /*message*/) {
 }
 
 void VSyncChannel::Ack() {
-  ALOGD_IF(TRACE, "VSyncChannel::Ack: pid=%d cid=%d\n", pid_, cid_);
+  ALOGD_IF(TRACE > 1, "VSyncChannel::Ack: pid=%d cid=%d\n", pid_, cid_);
   service_.ModifyChannelEvents(cid_, POLLPRI, 0);
 }
 
 void VSyncChannel::Signal() {
-  ALOGD_IF(TRACE, "VSyncChannel::Signal: pid=%d cid=%d\n", pid_, cid_);
+  ALOGD_IF(TRACE > 1, "VSyncChannel::Signal: pid=%d cid=%d\n", pid_, cid_);
   service_.ModifyChannelEvents(cid_, 0, POLLPRI);
 }