Age | Commit message (Collapse) | Author |
|
Some recent version of trace-cmd prints sched_wakeup and sched_wakeup_new
events using a format string. Thus, when this events are required we must
parse them from the raw trace.
Since these events are already available mainline, this patch pre-register
them dynamically as raw events. This allows to parse these events (when
required) using the proper trace.
The patch adds also a test case by using the original formatted trace as
a source for the raw trace to use.
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
|
|
This patch introduces two new functions which
allow the user to register events dynamically
(by using metaclasses) and also register classes
without touching the cr2 code.
test_dynamic has test cases which test this functionality
More complex classes can be registered (register_class) dynamically
but not generated dynamically
All scoped classes should be propagated to both scopes. Added an
assert to test the same
Change-Id: I8dbffa6df4c5bbe04754aa7e6fa8f3ec6a8213be
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|
|
This patch adds all the currently used scheduler data classes.
Two of the scheduler data classes (SchedLoadAvgSchedGroup and CpuFrequency)
need special handling after the trace file has been parsed. Class Base gets
a finalize_object method which can be overwritten by a derived class to
manipulate its data frame after the trace file has been parsed. The method
is called in Run::__finalize_objects.
In most use cases, either thermal or scheduler trace data has to be examined.
To further reduce the parse-time introduce a scope parameter to the __init__
method of class Run to be able to create either thermal or scheduler related
data objects in the Run object. The default behaviour is to create thermal and
scheduler data objects together.
This patch renames the test trace file trace_sched.txt to trace_empty.txt
which can be used to test behaviour if there are no matching traces in the
trace file and it creates a new trace_sched.txt file which contains one
matching trace for each scheduler data object.
It adds test cases to check the proper data frame creation for each scheduler
data object and a test case to check that for an empty trace file the
appropriate data frames remain empty.
It alters the test case TestRun::test_run_has_all_classes from checking that
the length of data frames of the thermal data objects do have is greater then
zero towards checking that the appropriate attributes of the Run object have
been created and adds test cases TestRun::test_run_has_all_classes_scope_[all,
thermal,sched] to test this for the different settings of the scope parameter.
Change-Id: I6d9e58569d5132d194ed3558c2dbfe4d5903af59
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
|
|
While we are at it, rename trace_empty.txt to trace_sched.txt, as it
better describes what it is.
|