Skip to content

ftrace events: use @requires_events on top of hand-specified ftrace_conf

Douglas Raillard requested to merge github/fork/douglas-raillard-arm/_pr102 into next

Introduce a metaclass for RTATestBundle that makes sure that the ftrace_conf of each subclass get at least all the events that are needed by their methods when they are decorated using @requires_events.

That avoids duplication of that information and also avoids writing it explicitly in docstrings, since sphinx will add the list of required events using the same information. That also allows setting the required events deep in the analysis functions that actually use it, and then pointing to that through the call chain using @the_analysis_method.used_events.

Also, use that for --list-trace-events that has been revamped and removed at the occasion (removed=there is no CLI option anymore since it is always done by default).

In this PR, I've "ported" synthetic tests to use that system, so they don't need any manual ftrace_conf class attribute to be setup anymore.

Merge request reports