summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Erick Reyes <erickreyes@google.com> 2019-02-11 14:46:36 -0800
committer Erick Reyes <erickreyes@google.com> 2019-02-12 17:39:53 -0800
commite68df82558248b36241a3ca623ea43e5ec6022ab (patch)
tree2f34d5227185e4da420a2771d5bf4820db58c5de
parente2c93962830acc70ef0cf43dd7b62a91f6313d56 (diff)
Call dmabuf_dump tool in dumpstate
This tool will dump shared buffer information on bug reports. Since it is being rolled out on specific products, look for the binary in /product/bin and execute it if found. Bug: 63860998 Change-Id: If6e4ff48d3bc62e1fa7a88f16cc6ab0d5b05176f Signed-off-by: Erick Reyes <erickreyes@google.com>
-rw-r--r--cmds/dumpstate/dumpstate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index a91eafeb8b..8bd834d2de 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -1458,6 +1458,12 @@ static bool DumpstateDefault() {
// Run iotop as root to show top 100 IO threads
RunCommand("IOTOP", {"iotop", "-n", "1", "-m", "100"});
+ // Gather shared memory buffer info if the product implements it
+ struct stat st;
+ if (!stat("/product/bin/dmabuf_dump", &st)) {
+ RunCommand("Dmabuf dump", {"/product/bin/dmabuf_dump"});
+ }
+
if (!DropRootUser()) {
return false;
}