summaryrefslogtreecommitdiff
path: root/api/api_test.go
diff options
context:
space:
mode:
author Lee Shombert <shombert@google.com> 2024-09-16 20:49:08 -0700
committer Lee Shombert <shombert@google.com> 2024-09-17 16:12:32 -0700
commitfd9d6a097c9c764e4a8554007177b25aeaa0f4eb (patch)
treebf4bbb3b1d985267a241902daf302f611108d02b /api/api_test.go
parentfeaa25f828313c707a9258ef1a1b472cd7ef5b32 (diff)
Add anr tracing to AnrTimerService
This change allows user to configure tracing on ANR timers for specified processes. Configuration is through the `am` shell command; it is meant to be used by application or system developers - not by end users. When a timer is traced, extra actions can be executed at the "split point" - an early timeout specified as a percentage of the originally programmed timeout. Information at the early timeout helps developers analyze current or incipient ANRs. Tested by manually generating an ANR (using a custom app) and verifying that the expected perfetto trace events were created or that the timer expired, as appropriate. The command to generate trace points on a process's timer is: `adb shell am trace-timer name="anrtimer.receiver"` The command to generate tracepoints and expire a timer at the 20% point is: `adb shell am trace-timer name="anrtimer.receiver" expire=20` The command to disable tracing, if it was ever enabled, is: `adb shell am trace-timer off` Bug: 352085328 Flag: com.android.server.utils.anr_timer_trace Test: atest * FrameworksServicesTests:com.android.server.am * FrameworksServicesTests:AnrTimerTest Change-Id: Ibc30f1f488baff056225671f063f026ce30e2e6f
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions