bt2: Add bindings for trace classes
This patch adds a Python wrapper for the bt_trace_class concept.
Trace classes in Python are created using the _create_trace_class on a
_UserComponent.
A TraceClass is seen as a mapping of stream class ids to stream classes.
This means that with trace class `tc`, it's possible to access its
stream classes by id using `tc[id]`. It's also possible to iterate on
`tc` to iterate on stream class ids.
A brand new test is also added, along with some test utils that should
be useful in future tests as well.
It is not feature-complete yet, for example there is no way to
instantiate a trace using this trace class, this will come in a
subsequent patch (that will handle test_trace.py). It is possible to
create stream classes in a trace class, but not with every possible
option, just enough to support the trace class tests.
Change-Id: Ib9f29d7ebc21b6ade19e9ffbad3f4b85e790321d
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1283
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.038851 seconds and 4 git commands to generate.