From f8ee064e89bcce424f37c237088d118dc7413133 Mon Sep 17 00:00:00 2001 From: Louis Boval Date: Thu, 27 Mar 2014 18:03:12 -0700 Subject: [PATCH] Properly match process kill/death/leave messages for secondary processes 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. --- pidcat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pidcat.py b/pidcat.py index 075b0fe..95214a9 100755 --- a/pidcat.py +++ b/pidcat.py @@ -140,9 +140,9 @@ TAGTYPES = { } PID_START = re.compile(r'^Start proc ([a-zA-Z0-9._:]+) for ([a-z]+ [^:]+): pid=(\d+) uid=(\d+) gids=(.*)$') -PID_KILL = re.compile(r'^Killing (\d+):([a-zA-Z0-9._]+)/[^:]+: (.*)$') -PID_LEAVE = re.compile(r'^No longer want ([a-zA-Z0-9._]+) \(pid (\d+)\): .*$') -PID_DEATH = re.compile(r'^Process ([a-zA-Z0-9._]+) \(pid (\d+)\) has died.?$') +PID_KILL = re.compile(r'^Killing (\d+):([a-zA-Z0-9._:]+)/[^:]+: (.*)$') +PID_LEAVE = re.compile(r'^No longer want ([a-zA-Z0-9._:]+) \(pid (\d+)\): .*$') +PID_DEATH = re.compile(r'^Process ([a-zA-Z0-9._:]+) \(pid (\d+)\) has died.?$') LOG_LINE = re.compile(r'^([A-Z])/(.+?)\( *(\d+)\): (.*?)$') BUG_LINE = re.compile(r'.*nativeGetEnabledTags.*') BACKTRACE_LINE = re.compile(r'^#(.*?)pc\s(.*?)$')