@@ -0,0 +1,840 @@
+%0Aimport re%0Aimport sys%0A%0Afrom collections import Counter%0A%0Adef oneof(strs):%0A    return %22(?:%25s)%22 %25 %22%7C%22.join(strs)%0A%0ABRIDGE_REGEX = r%22# bridge out of Guard (0x%5B0-9a-fA-f%5D*) with %5Cd* ops%22%0Abridge_regex = re.compile(BRIDGE_REGEX)%0A%0Adef main(args):%0A    for fname in sorted(args):%0A%0A        with open(fname, 'r') as infile:%0A            data = infile.read()%0A%0A        bridge_ids = bridge_regex.findall(data)%0A%0A        all_ids = oneof(bridge_ids)%0A%0A        guard_regex = r%22%5C+%5Cd*: (guard_%5B%5E(%5D*)%5C(.*descr=%3CGuard%25s%3E%5C).*%22 %25 all_ids%0A        guard_regex = re.compile(guard_regex)%0A        guards = guard_regex.findall(data)%0A%0A        counter = Counter(guards)%0A        print(fname)%0A        for k, v in sorted(counter.items(), key=lambda x: x%5B0%5D):%0A            print(%22%7B:%3C20%7D %7B%7D%22.format(k + %22:%22, v))%0A        print(%22%22)%0A%0Aif __name__ == '__main__':%0A    main(sys.argv%5B1:%5D)%0A%0A

Add trace log stats extractor