From c434c34e80c0330136c58f161b3ff8b4cbfa3a05 Mon Sep 17 00:00:00 2001 From: Michael McGeagh Date: Mon, 10 Apr 2017 14:57:32 +0100 Subject: [PATCH] System:systrace Added events parsing from te.conf Can now override default systrace events by having a dictionary in the testenv configuration dictionary, similar to ftrace events: 'systrace': { 'events': [ # List of systrace event strings ] } --- libs/utils/android/system.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 libs/utils/android/system.py diff --git a/libs/utils/android/system.py b/libs/utils/android/system.py old mode 100644 new mode 100755 index 42e8c4dec..b8fe98848 --- a/libs/utils/android/system.py +++ b/libs/utils/android/system.py @@ -30,11 +30,17 @@ class System(object): """ @staticmethod - def systrace_start(target, trace_file, time=None, - events=['gfx', 'view', 'sched', 'freq', 'idle']): + def systrace_start(target, trace_file, time=None): log = logging.getLogger('System') + # Load the list of events for systrace from the target conf file + if ('systrace' in target.conf) and ('events' in target.conf['systrace']): + events = target.conf['systrace']['events'] + # Default list of events to capture + else: + events = ['gfx', 'view', 'sched', 'freq', 'idle'] + # Check which systrace binary is available under CATAPULT_HOME for systrace in ['systrace.py', 'run_systrace.py']: systrace_path = os.path.join(target.CATAPULT_HOME, 'systrace', -- GitLab