Skip to content

Commit

Permalink
lisa.trace: Fix text trace parser regex
Browse files Browse the repository at this point in the history
FIX

Fix buffer name parsing so that we do not accidentally consume part of
the comm field.
  • Loading branch information
douglas-raillard-arm committed Jan 19, 2024
1 parent b96fdd5 commit 57689c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lisa/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def _get_header_regex(cls, event):
if field in ('__timestamp', '__event')
)

regex = r'^.*:?{blank}{__comm}-{__pid}{blank}\[{__cpu}\]{blank}{__timestamp}:{blank}{__event}:'.format(**compos, blank=blank)
regex = r'(?:(?:^.*?:)|^){blank}{__comm}-{__pid}{blank}\[{__cpu}\]{blank}{__timestamp}:{blank}{__event}:'.format(**compos, blank=blank)
return regex

def _get_regex(self, event, fields, positional_field, greedy_field):
Expand Down

0 comments on commit 57689c9

Please sign in to comment.