From 4d407a0f05ad9ba3c232ff5b6742495660c0e4ab Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Mon, 25 Aug 2014 14:44:16 -0700 Subject: [PATCH] surfaceflinger: Trace HW vsync enable This makes it possible to tell whether two HW vsync signals are too far apart because one was late, or because we turned HW vsync off briefly between them. Bug: 17259382 Change-Id: If4fba2a8a6013568349949ce87c5c36f0468d2a2 --- services/surfaceflinger/DisplayHardware/HWComposer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index a8dcf9808..630205348 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -524,6 +524,10 @@ void HWComposer::eventControl(int disp, int event, int enabled) { if (!err) { int32_t& events(mDisplayData[disp].events); events = (events & ~eventBit) | newValue; + + char tag[16]; + snprintf(tag, sizeof(tag), "HW_VSYNC_ON_%1u", disp); + ATRACE_INT(tag, enabled); } } // error here should not happen -- not sure what we should