summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Gamito <pablogamito@google.com>2023-05-04 10:16:56 +0000
committerPablo Gamito <pablogamito@google.com>2023-05-04 10:33:08 +0000
commitedd0219c54f99adf83ec1fb5d77b8e179df5552f (patch)
tree0ab087b72fdf872a7fd33dc1a7b784e82ecde68e
parent811195d460898ac15c34520af9f2b91e94afc48c (diff)
downloaddevelopment-edd0219c54f99adf83ec1fb5d77b8e179df5552f.tar.gz
Update Winscope proxy to collect both transition trace files
Bug: 277181336 Test: npm run build:all && npm run test:all Change-Id: I6697812fe929efe0927358fe14dc0ea155199631
-rw-r--r--tools/winscope/src/adb/winscope_proxy.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/winscope/src/adb/winscope_proxy.py b/tools/winscope/src/adb/winscope_proxy.py
index 5fbe58f58..15f606c73 100644
--- a/tools/winscope/src/adb/winscope_proxy.py
+++ b/tools/winscope/src/adb/winscope_proxy.py
@@ -197,11 +197,12 @@ TRACE_TARGETS = {
'rm -f /data/local/tmp/eventlog.winscope && EVENT_LOG_TRACING_START_TIME=$EPOCHREALTIME\necho "Event Log trace started."',
'echo "EventLog\\n" > /data/local/tmp/eventlog.winscope && su root logcat -b events -v threadtime -v printable -v uid -v nsec -v epoch -b events -t $EVENT_LOG_TRACING_START_TIME >> /data/local/tmp/eventlog.winscope',
),
- "transition_trace": TraceTarget(
- WinscopeFileMatcher(WINSCOPE_DIR, "transition_trace", "transition_trace"),
- 'su root cmd window shell tracing start\necho "WMShell Transition trace started."',
- 'su root cmd window shell tracing stop >/dev/null 2>&1'
- )
+ "transition_traces": TraceTarget(
+ [WinscopeFileMatcher(WINSCOPE_DIR, "wm_transition_trace", "wm_transition_trace"),
+ WinscopeFileMatcher(WINSCOPE_DIR, "shell_transition_trace", "shell_transition_trace")],
+ 'su root cmd window shell tracing start && su root dumpsys activity service SystemUIService WMShell transitions tracing start\necho "Transition traces started."',
+ 'su root cmd window shell tracing stop && su root dumpsys activity service SystemUIService WMShell transitions tracing stop >/dev/null 2>&1'
+ ),
}
@@ -671,6 +672,7 @@ while true; do sleep 0.1; done
def process_with_device(self, server, path, device_id):
try:
requested_types = self.get_request(server)
+ log.debug(f"Clienting requested trace types {requested_types}")
requested_traces = [TRACE_TARGETS[t] for t in requested_types]
except KeyError as err:
raise BadRequest("Unsupported trace target\n" + str(err))
@@ -686,6 +688,7 @@ while true; do sleep 0.1; done
'\n'.join([t.trace_start for t in requested_traces]))
log.debug("Trace requested for {} with targets {}".format(
device_id, ','.join(requested_types)))
+ log.debug(f"Executing command \"{command}\" on {device_id}...")
TRACE_THREADS[device_id] = TraceThread(
device_id, command.encode('utf-8'))
TRACE_THREADS[device_id].start()