Loading services/surfaceflinger/SurfaceFlinger.cpp +11 −8 Original line number Original line Diff line number Diff line Loading @@ -4485,7 +4485,8 @@ status_t SurfaceFlinger::doDump(int fd, const DumpArgs& args, const auto flag = args.empty() ? ""s : std::string(String8(args[0])); const auto flag = args.empty() ? ""s : std::string(String8(args[0])); if (const auto it = dumpers.find(flag); it != dumpers.end()) { const auto it = dumpers.find(flag); if (it != dumpers.end()) { (it->second)(args, asProto, result); (it->second)(args, asProto, result); } else if (!asProto) { } else if (!asProto) { dumpAllLocked(args, result); dumpAllLocked(args, result); Loading @@ -4495,15 +4496,17 @@ status_t SurfaceFlinger::doDump(int fd, const DumpArgs& args, mStateLock.unlock(); mStateLock.unlock(); } } LayersProto layersProto = dumpProtoFromMainThread(); if (it == dumpers.end()) { const LayersProto layersProto = dumpProtoFromMainThread(); if (asProto) { if (asProto) { result.append(layersProto.SerializeAsString().c_str(), layersProto.ByteSize()); result.append(layersProto.SerializeAsString()); } else { } else { auto layerTree = LayerProtoParser::generateLayerTree(layersProto); const auto layerTree = LayerProtoParser::generateLayerTree(layersProto); result.append(LayerProtoParser::layerTreeToString(layerTree)); result.append(LayerProtoParser::layerTreeToString(layerTree)); result.append("\n"); result.append("\n"); } } } } } write(fd, result.c_str(), result.size()); write(fd, result.c_str(), result.size()); return NO_ERROR; return NO_ERROR; } } Loading services/surfaceflinger/TimeStats/TimeStats.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -601,7 +601,7 @@ void TimeStats::dump(bool asProto, std::optional<uint32_t> maxLayers, std::strin if (asProto) { if (asProto) { ALOGD("Dumping TimeStats as proto"); ALOGD("Dumping TimeStats as proto"); SFTimeStatsGlobalProto timeStatsProto = mTimeStats.toProto(maxLayers); SFTimeStatsGlobalProto timeStatsProto = mTimeStats.toProto(maxLayers); result.append(timeStatsProto.SerializeAsString().c_str(), timeStatsProto.ByteSize()); result.append(timeStatsProto.SerializeAsString()); } else { } else { ALOGD("Dumping TimeStats as text"); ALOGD("Dumping TimeStats as text"); result.append(mTimeStats.toString(maxLayers)); result.append(mTimeStats.toString(maxLayers)); Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +11 −8 Original line number Original line Diff line number Diff line Loading @@ -4485,7 +4485,8 @@ status_t SurfaceFlinger::doDump(int fd, const DumpArgs& args, const auto flag = args.empty() ? ""s : std::string(String8(args[0])); const auto flag = args.empty() ? ""s : std::string(String8(args[0])); if (const auto it = dumpers.find(flag); it != dumpers.end()) { const auto it = dumpers.find(flag); if (it != dumpers.end()) { (it->second)(args, asProto, result); (it->second)(args, asProto, result); } else if (!asProto) { } else if (!asProto) { dumpAllLocked(args, result); dumpAllLocked(args, result); Loading @@ -4495,15 +4496,17 @@ status_t SurfaceFlinger::doDump(int fd, const DumpArgs& args, mStateLock.unlock(); mStateLock.unlock(); } } LayersProto layersProto = dumpProtoFromMainThread(); if (it == dumpers.end()) { const LayersProto layersProto = dumpProtoFromMainThread(); if (asProto) { if (asProto) { result.append(layersProto.SerializeAsString().c_str(), layersProto.ByteSize()); result.append(layersProto.SerializeAsString()); } else { } else { auto layerTree = LayerProtoParser::generateLayerTree(layersProto); const auto layerTree = LayerProtoParser::generateLayerTree(layersProto); result.append(LayerProtoParser::layerTreeToString(layerTree)); result.append(LayerProtoParser::layerTreeToString(layerTree)); result.append("\n"); result.append("\n"); } } } } } write(fd, result.c_str(), result.size()); write(fd, result.c_str(), result.size()); return NO_ERROR; return NO_ERROR; } } Loading
services/surfaceflinger/TimeStats/TimeStats.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -601,7 +601,7 @@ void TimeStats::dump(bool asProto, std::optional<uint32_t> maxLayers, std::strin if (asProto) { if (asProto) { ALOGD("Dumping TimeStats as proto"); ALOGD("Dumping TimeStats as proto"); SFTimeStatsGlobalProto timeStatsProto = mTimeStats.toProto(maxLayers); SFTimeStatsGlobalProto timeStatsProto = mTimeStats.toProto(maxLayers); result.append(timeStatsProto.SerializeAsString().c_str(), timeStatsProto.ByteSize()); result.append(timeStatsProto.SerializeAsString()); } else { } else { ALOGD("Dumping TimeStats as text"); ALOGD("Dumping TimeStats as text"); result.append(mTimeStats.toString(maxLayers)); result.append(mTimeStats.toString(maxLayers)); Loading