From 78314c1ef24a59113f5db9bdd090110276a36497 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Mon, 29 Jun 2015 17:28:00 +0100 Subject: [PATCH] cpustates added an option to ignore trace markers. --- wlauto/utils/power.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wlauto/utils/power.py b/wlauto/utils/power.py index a9262fb2..0f875ab0 100644 --- a/wlauto/utils/power.py +++ b/wlauto/utils/power.py @@ -533,9 +533,9 @@ def build_idle_domains(core_clusters, # NOQA def report_power_stats(trace_file, idle_state_names, core_names, core_clusters, num_idle_states, first_cluster_state=sys.maxint, first_system_state=sys.maxint, use_ratios=False, - timeline_csv_file=None): + timeline_csv_file=None, filter_trace=True): # pylint: disable=too-many-locals - trace = TraceCmdTrace() + trace = TraceCmdTrace(filter_markers=filter_trace) ps_processor = PowerStateProcessor(core_clusters, num_idle_states=num_idle_states, first_cluster_state=first_cluster_state, @@ -578,6 +578,7 @@ def main(): first_system_state=args.first_system_state, use_ratios=args.ratios, timeline_csv_file=args.timeline_file, + filter_trace=(not args.no_trace_filter), ) parallel_report.write(os.path.join(args.output_directory, 'parallel.csv')) powerstate_report.write(os.path.join(args.output_directory, 'cpustate.csv')) @@ -607,6 +608,11 @@ def parse_arguments(): # NOQA help=''' Output directory where reports will be placed. ''') + parser.add_argument('-F', '--no-trace-filter', action='store_true', default=False, + help=''' + Normally, only the trace between begin and end marker is used. This disables + the filtering so the entire trace file is considered. + ''') parser.add_argument('-c', '--core-names', action=SplitListAction, help=''' Comma-separated list of core names for the device on which the trace