|
33 | 33 | # <is symbol?> <closest elf symbol or DSO name> <relative FROM address>
|
34 | 34 | # <is symbol?> <closest elf symbol or DSO name> <relative TO address>
|
35 | 35 | # <number of mispredictions> <number of branches>
|
36 |
| -fdata_pat = re.compile(r"([01].*) (?P<exec>\d+) (?P<mispred>\d+)") |
| 36 | +fdata_pat = re.compile(r"([01].*) (?P<mispred>\d+) (?P<exec>\d+)") |
37 | 37 |
|
38 | 38 | # Pre-aggregated profile:
|
39 | 39 | # {T|B|F|f} [<start_id>:]<start_offset> [<end_id>:]<end_offset> [<ft_end>]
|
|
61 | 61 | preagg_match = preagg_pat.match(profile_line)
|
62 | 62 | nolbr_match = nolbr_pat.match(profile_line)
|
63 | 63 | if fdata_match:
|
64 |
| - src_dst, execnt, mispred = fdata_match.groups() |
| 64 | + src_dst, mispred, execnt = fdata_match.groups() |
65 | 65 | # Split by whitespaces not preceded by a backslash (negative lookbehind)
|
66 | 66 | chunks = re.split(r"(?<!\\) +", src_dst)
|
67 | 67 | # Check if the number of records separated by non-escaped whitespace
|
68 | 68 | # exactly matches the format.
|
69 | 69 | assert (
|
70 | 70 | len(chunks) == 6
|
71 | 71 | ), f"ERROR: wrong format/whitespaces must be escaped:\n{line}"
|
72 |
| - exprs.append(("FDATA", (*chunks, execnt, mispred))) |
| 72 | + exprs.append(("FDATA", (*chunks, mispred, execnt))) |
73 | 73 | elif nolbr_match:
|
74 | 74 | loc, count = nolbr_match.groups()
|
75 | 75 | # Split by whitespaces not preceded by a backslash (negative lookbehind)
|
|
0 commit comments