Skip to content

Commit

Permalink
lisa.trace: Switch to TraceDumpTraceParser by default
Browse files Browse the repository at this point in the history
FEATURE

Switch the parser for trace.dat format to the new trace-dump parser.

Also make a number of changes to the parsing infrastructure:
* New trace-id parser metadata that is used instead of md5 checksum when
  available.

* Meta events are now tried directly before their source event, so the
  parser has a chance to handle that directly. This is critical for
  trace_printk@ performance as the new parser handles it natively.

* TraceParserBase subclasses are now used as a context manager when
  costly operation such as event parsing (always) or metadata querying
  (only when the result is really needed). This allows the parser to
  correctly manage its resources, while allowing cheap metadata
  gathering to happen as part of the constructor if needed.

* A number of fixes such as minimzation of parsing attempts if an event
  is known to not be parseable.

* available-events metadata are now cached in the trace cache.

* Removed the multiprocessing parsing from lisa.trace.Trace. This is
  effectively useless with the new parser (which is parallel on its own)
  and avoids pitfalls of forking Python process (sluggish import time or
  crashy/illegal libc calls after fork, pick your poison)

If need be, the old parser is still available and can be used as:

    Trace(..., parser=TxtTraceParser.from_dat)

However, it is not expected that the old parser has any use beyond some
meta events (userspace@...) so if you have problems with the new one,
please open a bug report with the trace.dat.
  • Loading branch information
douglas-raillard-arm committed Jan 17, 2024
1 parent c382d33 commit 23354a9
Show file tree
Hide file tree
Showing 4 changed files with 523 additions and 257 deletions.
Binary file added lisa/_assets/binaries/arm64/trace-dump
Binary file not shown.
Binary file added lisa/_assets/binaries/x86_64/trace-dump
Binary file not shown.
Loading

0 comments on commit 23354a9

Please sign in to comment.