Add window and surface trace files to bug report
- rename surface trace path to use common location
Bug: 64831661
Test: adb shell su root service call SurfaceFlinger 1025 i32 1 >/dev/null && adb shell su root service call SurfaceFlinger 1025 i32 0 >/dev/null && adb bugreport ~/tmp.zip
Change-Id: I0b166a1098158a12c1da192e38c4d3cf011710a6
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 201b5a3..364ead0 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -81,6 +81,7 @@
#define PROFILE_DATA_DIR_CUR "/data/misc/profiles/cur"
#define PROFILE_DATA_DIR_REF "/data/misc/profiles/ref"
#define WLUTIL "/vendor/xbin/wlutil"
+#define WMTRACE_DATA_DIR "/data/misc/wmtrace"
// TODO(narayan): Since this information has to be kept in sync
// with tombstoned, we should just put it in a common header.
@@ -1210,6 +1211,11 @@
DumpFile("BINDER STATS", "/sys/kernel/debug/binder/stats");
DumpFile("BINDER STATE", "/sys/kernel/debug/binder/state");
+ /* Add window and surface trace files. */
+ if (!PropertiesHelper::IsUserBuild()) {
+ ds.AddDir(WMTRACE_DATA_DIR, false);
+ }
+
ds.DumpstateBoard();
/* Migrate the ril_dumpstate to a device specific dumpstate? */