Support transition trace capturing in Winscope

Test: npm run build:all && npm run test:all
Bug: 265791162
Change-Id: Ie1d8604bbb362ee1940dc46291446cdbbeeeecda
This commit is contained in:
Pablo Gamito
2023-04-05 13:14:53 +00:00
parent 4dfbda2b42
commit 883da85ea4
3 changed files with 18 additions and 0 deletions

View File

@@ -196,6 +196,11 @@ TRACE_TARGETS = {
WinscopeFileMatcher("/data/local/tmp", "eventlog", "eventlog"),
'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'
)
}

View File

@@ -29,6 +29,7 @@ const ACCESSIBILITY_ICON = "accessibility_new";
const TAG_ICON = "details";
const TRACE_ERROR_ICON = "warning";
const EVENT_LOG_ICON = "description";
const TRANSITION_ICON = "animation";
interface TraceInfoMap {
[key: number]: {
@@ -123,5 +124,10 @@ export const TRACE_INFO: TraceInfoMap = {
name: "Event Log",
icon: EVENT_LOG_ICON,
color: "#fdd663",
},
[TraceType.TRANSITION]: {
name: "Transition Trace",
icon: TRANSITION_ICON,
color: "#EC407A",
}
};

View File

@@ -208,6 +208,12 @@ export const traceConfigurations: TraceConfigurationMap = {
run: false,
config: undefined,
},
transition_trace: {
name: "Shell Transitions",
isTraceCollection: undefined,
run: false,
config: undefined,
},
};
export const TRACES: {[key: string]: TraceConfigurationMap} = {
@@ -220,6 +226,7 @@ export const TRACES: {[key: string]: TraceConfigurationMap} = {
screen_recording: traceConfigurations['screen_recording'],
ime_tracing: traceConfigurations['ime_tracing'],
eventlog: traceConfigurations["eventlog"],
transition_trace: traceConfigurations["transition_trace"],
},
arc: {
wayland_trace: traceConfigurations['wayland_trace'],