Loading cmds/dumpstate/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,7 @@ cc_defaults { "libhidlbase", "libhidlbase", "liblog", "liblog", "libutils", "libutils", "libvintf", "libbinderdebug", "libbinderdebug", "packagemanager_aidl-cpp", "packagemanager_aidl-cpp", ], ], Loading cmds/dumpstate/dumpstate.cpp +20 −0 Original line number Original line Diff line number Diff line Loading @@ -88,6 +88,7 @@ #include <private/android_logger.h> #include <private/android_logger.h> #include <serviceutils/PriorityDumper.h> #include <serviceutils/PriorityDumper.h> #include <utils/StrongPointer.h> #include <utils/StrongPointer.h> #include <vintf/VintfObject.h> #include "DumpstateInternal.h" #include "DumpstateInternal.h" #include "DumpstateService.h" #include "DumpstateService.h" #include "dumpstate.h" #include "dumpstate.h" Loading Loading @@ -1396,6 +1397,23 @@ static void DumpHals(int out_fd = STDOUT_FILENO) { } } } } // Dump all of the files that make up the vendor interface. // See the files listed in dumpFileList() for the latest list of files. static void DumpVintf() { const auto vintfFiles = android::vintf::details::dumpFileList(); for (const auto vintfFile : vintfFiles) { struct stat st; if (stat(vintfFile.c_str(), &st) == 0) { if (S_ISDIR(st.st_mode)) { ds.AddDir(vintfFile, true /* recursive */); } else { ds.EnqueueAddZipEntryAndCleanupIfNeeded(ZIP_ROOT_DIR + vintfFile, vintfFile); } } } } static void DumpExternalFragmentationInfo() { static void DumpExternalFragmentationInfo() { struct stat st; struct stat st; if (stat("/proc/buddyinfo", &st) != 0) { if (stat("/proc/buddyinfo", &st) != 0) { Loading Loading @@ -1621,6 +1639,8 @@ static Dumpstate::RunStatus dumpstate() { do_dmesg(); do_dmesg(); } } DumpVintf(); RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT); RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(for_each_pid, do_showmap, "SMAPS OF ALL PROCESSES"); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(for_each_pid, do_showmap, "SMAPS OF ALL PROCESSES"); Loading Loading
cmds/dumpstate/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,7 @@ cc_defaults { "libhidlbase", "libhidlbase", "liblog", "liblog", "libutils", "libutils", "libvintf", "libbinderdebug", "libbinderdebug", "packagemanager_aidl-cpp", "packagemanager_aidl-cpp", ], ], Loading
cmds/dumpstate/dumpstate.cpp +20 −0 Original line number Original line Diff line number Diff line Loading @@ -88,6 +88,7 @@ #include <private/android_logger.h> #include <private/android_logger.h> #include <serviceutils/PriorityDumper.h> #include <serviceutils/PriorityDumper.h> #include <utils/StrongPointer.h> #include <utils/StrongPointer.h> #include <vintf/VintfObject.h> #include "DumpstateInternal.h" #include "DumpstateInternal.h" #include "DumpstateService.h" #include "DumpstateService.h" #include "dumpstate.h" #include "dumpstate.h" Loading Loading @@ -1396,6 +1397,23 @@ static void DumpHals(int out_fd = STDOUT_FILENO) { } } } } // Dump all of the files that make up the vendor interface. // See the files listed in dumpFileList() for the latest list of files. static void DumpVintf() { const auto vintfFiles = android::vintf::details::dumpFileList(); for (const auto vintfFile : vintfFiles) { struct stat st; if (stat(vintfFile.c_str(), &st) == 0) { if (S_ISDIR(st.st_mode)) { ds.AddDir(vintfFile, true /* recursive */); } else { ds.EnqueueAddZipEntryAndCleanupIfNeeded(ZIP_ROOT_DIR + vintfFile, vintfFile); } } } } static void DumpExternalFragmentationInfo() { static void DumpExternalFragmentationInfo() { struct stat st; struct stat st; if (stat("/proc/buddyinfo", &st) != 0) { if (stat("/proc/buddyinfo", &st) != 0) { Loading Loading @@ -1621,6 +1639,8 @@ static Dumpstate::RunStatus dumpstate() { do_dmesg(); do_dmesg(); } } DumpVintf(); RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT); RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(for_each_pid, do_showmap, "SMAPS OF ALL PROCESSES"); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(for_each_pid, do_showmap, "SMAPS OF ALL PROCESSES"); Loading