diff options
Diffstat (limited to 'cmds/dumpstate/dumpstate.cpp')
| -rw-r--r-- | cmds/dumpstate/dumpstate.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index f1757dcfd6..dc0e26b9a3 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -2199,6 +2199,16 @@ Dumpstate::RunStatus Dumpstate::DumpTraces(const char** path) { continue; } + // Skip cached processes. + if (IsCached(pid)) { + // For consistency, the header and footer to this message match those + // dumped by debuggerd in the success case. + dprintf(fd, "\n---- pid %d at [unknown] ----\n", pid); + dprintf(fd, "Dump skipped for cached process.\n"); + dprintf(fd, "---- end %d ----", pid); + continue; + } + const std::string link_name = android::base::StringPrintf("/proc/%d/exe", pid); std::string exe; if (!android::base::Readlink(link_name, &exe)) { |