From a9cbaf5097c089372cf152401007d70bcb13a95d Mon Sep 17 00:00:00 2001 From: Dileep Marchya Date: Thu, 3 Dec 2015 14:39:35 -0800 Subject: SurfaceFlinger: Add support for continuous dumpsys to file. - Collect dumpsys to an outfile file when triggered. - Collect dumpsys before calling Prepare on hwc module in each draw cycle. Recollect dumpsys if Commit goes through successfully and replace former dumpsys with this. - Wrap around if file size reaches appx 20 MB. - Generate output file at /data/misc/display/dumpsys.txt - Syntax: adb shell dumpsys SurfaceFlinger --file [--no-limit] --file : Ouput dumpsys to file --no-limit : Do not wrap around, keep appending Use same command to trigger start and end of dumping. - Output format: | start code | after commit? | time stamp | dump size | dump data | CRs-Fixed: 947084 Change-Id: Ie520f51c69757aeec88b9400688a7f3271472349 --- services/surfaceflinger/SurfaceFlinger.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'services/surfaceflinger/SurfaceFlinger.cpp') diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 43a0bd8..a457019 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1081,6 +1081,8 @@ void SurfaceFlinger::postComposition() mAnimFrameTracker.advanceFrame(); } + dumpDrawCycle(false); + if (hw->getPowerMode() == HWC_POWER_MODE_OFF) { return; } @@ -1248,6 +1250,8 @@ void SurfaceFlinger::setUpHWComposer() { } } + dumpDrawCycle(true); + status_t err = hwc.prepare(); ALOGE_IF(err, "HWComposer::prepare failed (%s)", strerror(-err)); -- cgit v1.1