diff options
| author | 2019-03-15 23:32:24 +0000 | |
|---|---|---|
| committer | 2019-03-15 23:32:24 +0000 | |
| commit | 178e86bb5218595d9fe20d7aa94a89df5b62028d (patch) | |
| tree | 38764a083921b5916bf92ed52afd0b647252ad4d | |
| parent | c6a1d4096dd6743b650e622829f8eea0a1340119 (diff) | |
| parent | 8e7dc72c26e8bf2e3ebc7e65e08f42f58ff4b6d6 (diff) | |
Merge "Add SF trace to bugreport"
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 8 | ||||
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 4205842c63..83e53fa869 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -4398,6 +4398,14 @@ status_t SurfaceFlinger::doDump(int fd, const DumpArgs& args, return NO_ERROR; } +status_t SurfaceFlinger::dumpCritical(int fd, const DumpArgs&, bool asProto) { + if (asProto && mTracing.isEnabled()) { + mTracing.writeToFileAsync(); + } + + return doDump(fd, DumpArgs(), asProto); +} + void SurfaceFlinger::listLayersLocked(std::string& result) const { mCurrentState.traverseInZOrder( [&](Layer* layer) { StringAppendF(&result, "%s\n", layer->getName().string()); }); diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index 103672cdb3..0d39cb58dd 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -905,9 +905,7 @@ private: status_t doDump(int fd, const DumpArgs& args, bool asProto); - status_t dumpCritical(int fd, const DumpArgs&, bool asProto) override { - return doDump(fd, DumpArgs(), asProto); - } + status_t dumpCritical(int fd, const DumpArgs&, bool asProto); status_t dumpAll(int fd, const DumpArgs& args, bool asProto) override { return doDump(fd, args, asProto); |