diff options
author | Minchan Kim <minchan@google.com> | 2022-06-09 15:57:07 -0700 |
---|---|---|
committer | Minchan Kim <minchan@google.com> | 2022-06-13 22:35:38 +0000 |
commit | d4bfa6908a22bd6d1e13c8cfda3bd7a5bb98210c (patch) | |
tree | 3677e453bcb61312acdab01d91bb398cfbdffb3a /dumpstate | |
parent | 227972b2cf36a725d5670dcbef5a786bb9044494 (diff) | |
download | gs201-d4bfa6908a22bd6d1e13c8cfda3bd7a5bb98210c.tar.gz |
dumpstate: dump cma information
At bugreport, dump cma information, which is useful for CMA
memory leak.
Bug: 233535442
Test: adb bugreport contains cma information in dumpstate_board.txt
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I37aa901b0376d5187c18c73422e9fa56bfd0d6bc
Diffstat (limited to 'dumpstate')
-rw-r--r-- | dumpstate/Dumpstate.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index 445c40a..939e3e0 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -891,6 +891,13 @@ void Dumpstate::dumpMemorySection(int fd) { "done"}); DumpFileToFd(fd, "dmabuf info", "/d/dma_buf/bufinfo"); DumpFileToFd(fd, "Page Pinner - longterm pin", "/sys/kernel/debug/page_pinner/buffer"); + RunCommandToFd(fd, "CMA info", {"/vendor/bin/sh", "-c", + "for d in $(ls -d /d/cma/*); do " + "echo --- $d;" + "echo --- count; cat $d/count; " + "echo --- used; cat $d/used; " + "echo --- bitmap; cat $d/bitmap; " + "done"}); } static void DumpF2FS(int fd) { |