diff options
| author | 2011-01-19 16:31:32 -0800 | |
|---|---|---|
| committer | 2011-01-19 16:31:32 -0800 | |
| commit | 6918b0b9b31e09cef675ad5aed0591ecda333d0c (patch) | |
| tree | 262ca54f0bc29e66d47915b9aa11d4c4d3d42e07 /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 800da1b4338752777b90b1a1780ed508b15424af (diff) | |
| parent | 48b888aab9fdcfba250722dffbdffe61f11c64f3 (diff) | |
Merge "improve SurfaceFlinger 'dumpsys' log" into honeycomb
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 65ad9568b3..434e473d74 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1491,8 +1491,13 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) result.append(buffer); } + /* + * Dump the visible layer list + */ const LayerVector& currentLayers = mCurrentState.layersSortedByZ; const size_t count = currentLayers.size(); + snprintf(buffer, SIZE, "Visible layers (count = %d)\n", count); + result.append(buffer); for (size_t i=0 ; i<count ; i++) { const sp<LayerBase>& layer(currentLayers[i]); layer->dump(result, buffer, SIZE); @@ -1502,6 +1507,24 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) layer->visibleRegionScreen.dump(result, "visibleRegionScreen"); } + /* + * Dump the layers in the purgatory + */ + + const size_t purgatorySize = mLayerPurgatory.size(); + snprintf(buffer, SIZE, "Purgatory state (%d entries)\n", purgatorySize); + result.append(buffer); + for (size_t i=0 ; i<purgatorySize ; i++) { + const sp<LayerBase>& layer(mLayerPurgatory.itemAt(i)); + layer->shortDump(result, buffer, SIZE); + } + + /* + * Dump SurfaceFlinger global state + */ + + snprintf(buffer, SIZE, "SurfaceFlinger global state\n"); + result.append(buffer); mWormholeRegion.dump(result, "WormholeRegion"); const DisplayHardware& hw(graphicPlane(0).displayHardware()); snprintf(buffer, SIZE, @@ -1527,6 +1550,9 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) result.append(buffer); } + /* + * Dump HWComposer state + */ HWComposer& hwc(hw.getHwComposer()); snprintf(buffer, SIZE, " h/w composer %s and %s\n", hwc.initCheck()==NO_ERROR ? "present" : "not present", @@ -1534,6 +1560,9 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args) result.append(buffer); hwc.dump(result, buffer, SIZE); + /* + * Dump gralloc state + */ const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get()); alloc.dump(result); hw.dump(result); |