Loading cmds/dumpstate/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ cc_binary { "main.cpp", ], required: [ "alloctop", "atrace", "bugreport_procdump", "dmabuf_dump", Loading cmds/dumpstate/dumpstate.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -1257,6 +1257,15 @@ static void DumpIpAddrAndRules() { RunCommand("IP RULES v6", {"ip", "-6", "rule", "show"}); } static void DumpKernelMemoryAllocations() { if (!access("/proc/allocinfo", F_OK)) { // Print the top 100 biggest memory allocations of at least one byte. // The output is sorted by size, descending. RunCommand("KERNEL MEMORY ALLOCATIONS", {"alloctop", "--once", "--sort", "s", "--min", "1", "--lines", "100"}); } } static Dumpstate::RunStatus RunDumpsysTextByPriority(const std::string& title, int priority, std::chrono::milliseconds timeout, std::chrono::milliseconds service_timeout) { Loading Loading @@ -1766,6 +1775,8 @@ Dumpstate::RunStatus Dumpstate::dumpstate() { DoKmsg(); DumpKernelMemoryAllocations(); DumpShutdownCheckpoints(); DumpIpAddrAndRules(); Loading Loading
cmds/dumpstate/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ cc_binary { "main.cpp", ], required: [ "alloctop", "atrace", "bugreport_procdump", "dmabuf_dump", Loading
cmds/dumpstate/dumpstate.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -1257,6 +1257,15 @@ static void DumpIpAddrAndRules() { RunCommand("IP RULES v6", {"ip", "-6", "rule", "show"}); } static void DumpKernelMemoryAllocations() { if (!access("/proc/allocinfo", F_OK)) { // Print the top 100 biggest memory allocations of at least one byte. // The output is sorted by size, descending. RunCommand("KERNEL MEMORY ALLOCATIONS", {"alloctop", "--once", "--sort", "s", "--min", "1", "--lines", "100"}); } } static Dumpstate::RunStatus RunDumpsysTextByPriority(const std::string& title, int priority, std::chrono::milliseconds timeout, std::chrono::milliseconds service_timeout) { Loading Loading @@ -1766,6 +1775,8 @@ Dumpstate::RunStatus Dumpstate::dumpstate() { DoKmsg(); DumpKernelMemoryAllocations(); DumpShutdownCheckpoints(); DumpIpAddrAndRules(); Loading