@@ -0,0 +1,1172 @@
+#!/usr/bin/python%0A%0A# This Source Code Form is subject to the terms of the Mozilla Public%0A# License, v. 2.0. If a copy of the MPL was not distributed with this%0A# file, You can obtain one at http://mozilla.org/MPL/2.0/.%0A%0A# Print out each tab process created during a test run, and the test it was created during.%0A%0Aimport sys%0Aimport re%0Aimport time%0A%0A%0AprocStartPatt = re.compile('%5E%5Cd%5Cd:%5Cd%5Cd:%5Cd%5Cd%5CW+INFO -  ### XPCOM%5C_MEM%5C_BLOAT%5C_LOG defined -- logging bloat%5C/leaks to .+runtests%5C_leaks%5C_tab%5C_pid(%5Cd+)%5C.log')%0A%0A%0Adef testDir(testName):%0A    return currTest.rsplit('/', 1)%5B0%5D + '/'%0A%0A# Parse the input looking for when tests run.%0A%0ApidTests = %7B%7D%0A%0AcurrTest = None%0A%0Afor l in sys.stdin:%0A    if l.find(%22TEST-START%22) %3E -1:%0A        currTest = l.split('%7C')%5B1%5D.strip()%0A    m = procStartPatt.match(l)%0A    if not m:%0A        continue%0A    currProc = int(m.group(1))%0A    if currProc in pidTests and testDir(currTest) == testDir(pidTests%5BcurrProc%5D):%0A        # This assumes run-by-dir.%0A        print('WARNING! Possible replay of pid ' + str(currProc) + ' in test dir ' + testDir(currTest))%0A    pidTests.setdefault(currProc, %5B%5D).append(currTest)%0A    print 'Found proc start:', currProc, currTest%0A%0A%0A%0A%0A

Add analyzer for which pids are open during which tests