lisa.trace.TxtEventParser#
- class lisa.trace.TxtEventParser(event, fields, positional_field=None, greedy_field=None, raw=True)[source]#
Bases:
EventParserBase
Trace event parser for raw output of
trace-cmd report -R trace.dat
.- Parameters:
event (str) – name of the event
fields (dict(str, str)) – mapping of field name to
pandas.DataFrame
column dtype to use for each.positional_field (str or None) – Name of the positional field. If
None
, no positional field will be parsed.greedy_field (str or None) – Name of a greedy field that will consume the remainder of the line, no matter what the content is. This allows parsing events with a field containing a string formatted itself as an event
raw (bool) – If
True
, trace-cmd report will be used in raw mode. This usually ensures compliance with the format, but may sometimes be a problem. For exampeconst char*
are displayed as an hex pointer in raw mode, which is not helpful.
Parses events with the following format:
devlib: <idle>-0 [001] 76.214046: sched_wakeup: something here: comm=watchdog/1 pid=15 prio=0 success=1 target_cpu=1 \____/ \___________________________________________/ \____________/ \_________________________________________________/ buffer header positional fields (optional)
Attributes
PARSER_REGEX_TERMINALS
inheritedSnippets of regex to be used in building more complex regexes in textual trace parsers.
Properties
Attributes#
- TxtEventParser.PARSER_REGEX_TERMINALS = {'blank': ' +', 'floating': '\\d+\\.\\d+', 'identifier': '\\w+', 'integer': '\\d+'}#
Inherited attribute, see
lisa.trace.EventParserBase.PARSER_REGEX_TERMINALS
Snippets of regex to be used in building more complex regexes in textual trace parsers.