aboutsummaryrefslogtreecommitdiff
path: root/trappy/sched.py
AgeCommit message (Collapse)Author
2017-06-27trappy/parsing: Ensure parse_raw is set for sched_switch eventsChris Redpath
When the sched_switch event is added to the parser the constructor is not called so we never set the parse_raw flag. Ensure there is a class variable to hold the correct value and use it in the constructor. We use the raw file to extract the events since we actually do construct one of these objects during parsing. Signed-off-by: Chris Redpath <chris.redpath@arm.com> Reviewed-by: KP Singh <kpsingh@google.com>
2017-01-04Update ARM Ltd. copyright to 2017Brendan Jackman
2016-09-13sched: make sched_migrate_task parse the normal trace from trace-cmdJavi Merino
The EAS patchset includes an enhancement of sched_migrate_task that includes a enum field printed with __print_symbolic that only gets parsed in the trace.txt and not in the trace.raw.txt. Remove the instances of sched_migrate_task from the trace_empty file to keep the tests testing a trace that is "empty", that is, no event in it is parsed.
2016-09-08sched: add sched_migrate_task to the list of automatically parsed sched eventsJavi Merino
sched_migrate_task has been in the kernel since v2.6.28. Let's add it to the events in the sched scope.
2016-03-24sched: cope with SysTrace's sched_switch eventJavi Merino
For trace-cmd traces, we use the raw trace to parse sched_switch. That's not possible for SysTrace traces, we don't have access to the raw data. Luckily SysTrace doesn't mangle the data as much as trace-cmd's plugin, so a simple string replace is enough to get rid of a stray "==>".
2016-03-22dynamic: use register_ftrace_parser() internallyJavi Merino
Most registration of base events in trappy were being done with FTrace.register_parser() which introduces unnecessary noise when refactoring. Use register_ftrace_parser() instead as it is what we recommend for external classes and it simplifies refactoring.
2016-02-03sched: add classes for wakeup/wakeup_new eventsPatrick Bellasi
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>
2016-01-05trappy: update copyright to 2016Javi Merino
2015-12-22dynamic: ensure dynamic methods refer to ftraceJavi Merino
Now that we can have traces coming from sources other than ftrace, rename register_dynamic() and register_class() to register_dynamic_ftrace() and register_ftrace_parser() to make it clear that they are only available for traces coming from ftrace.
2015-12-22ftrace: rename Run to FTraceJavi Merino
Run is a very generic and inappropriate name for an object that parses the result of ftrace into a form consumable by python. Rename it to FTrace in preparation for its generalization.
2015-11-30run: provide a name for the class if there isn't one alreadyJavi Merino
A number of trace classes are called as the trace event they parse. Unsurprisingly, the unique_word *is* the trace event name. Instead of repeating the same thing over and over, let register_class() assign a name to a class it's registering based on the unique_word if it doesn't have a name. This needs to be a class variable that's set before the class is instantiated (Run.register_class() needs it). So you can't set it in Base's constructor. You can't set it in DynamicTypeFactory either because not every Base class uses that. This looks like a good compromise and remove some redundant code. Change-Id: I6389c9ac072f6571b4faf8dacdee4cd77775a1f8
2015-11-27sched: consistently name sched trace classesPatrick Bellasi
When using Run(events=["cpu_capacity"]), we end up on re-using the pre-defined sched::SchedCpuCapacity class, which is registered as "sched_cpu_capacity", so it appears as run.sched_cpu_capacity. This misalignment is confusing for the user and should be avoided. Rename all the pre-registered sched related events to match the eventually user defined name.
2015-11-26base: remove the unique_word parameter from the constructor of BaseJavi Merino
Now that unique_word is required to be a class variable of all classes derived from Base there is no pass it to the constructor. Base can already pick it up. Thanks to this we can remove all the repeated code in the dummy constructors.
2015-11-24sched: Add pivot values to relevant eventsKapileshwar Singh
This patch adds pivot values to the pre-registered scheduler events Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
2015-11-16run: sched: rename "state" columns for cpu_frequency and cpu_capacityPatrick Bellasi
CPU Frequency and Capacity trace events report the actual "frequency" and "capacity" using an anonymous "state" column. Plots generated using Plotter use that columns name in the legend, thus making a bit confusing the plot, even worst when we want to plot both frequency and capacity. This patch assigns some more meaningful name to the "state" report by these two trace events. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-16run: rename 'cpu_id' column in SchedCpuCapacity to support Plotter pivotingPatrick Bellasi
To plot the sched_cpu_capacity events pivoted on the CPU number, we need to rename the 'cpu_id' column to read as 'cpu'. Otherwise we cannot 'mix and match' with other classes. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-09-17doc: sched: Use sphinx friendly docstringsKapileshwar Singh
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
2015-08-13trappy: rename to trappyJavi Merino
Change-Id: I7e0e34c9f5565e34629683bb29ab25cf5e737088