Skip to content
Commit 9f9e90df authored by Douglas Raillard's avatar Douglas Raillard
Browse files

lisa.trace: Switch to TraceDumpTraceParser by default

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.
parent 71549bb8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment