Summary: The regexes for process exits were no matching secondary processes, which makes it understandably hard to track their
lifecycles. Fix it by including ':' in the process name match groups, as in the process start regex.
Test Plan: Run, match the chrome process name, com.android.chrome, see its secondary processes start reporting their death.
Summary: Android apps can use multiple processes (eg, chrome), which are identified as <package_name>:<process_name> in logs. The names are defined in the manifest.
The main process is referred to as simply <package_name> by android.
Add the ability to specify a target process as part of what was until now the package name in pidcat, or all processes if no process is specified.
Usage:
* pidcat <package_name> will match all of an app's processes (catchall).
* pidcat <package_name>:<process_name> will match a given named process.
** In particular, pidcat <package_name>: will ensure only the app's main/default process is matched.
Test Plan: Run the script, try out with no process, empty (aka default) process, named process. Try multiple entries.
Summary: Making sense of a birth/death message is made easier by specifying which process it applies to, and not just the component or the pid.
Test Plan: Run, monitor message lines when cycling a multi-process app, inject None as a process name to check resilience.
It appears that java stack dumps contain the tab character. This causes
line length computation to be messed up, so (on at least some
terminals), the lines end up wrapping twice -- once when we hit the
right edge of the terminal, and then again a few characters later when
indent_wrap() inserts a newline. By using spaces, where pidcat and the
terminal can agree on the width of the character, we obviate this
problem.