Add a unique id to Perfetto trace and ANR dropbox header.
The unique id is added so that the trace and ANR can be easily linked server side. Also moves the logging of the ANR atom before the ANR dump takes place so that the Perfetto trace captures data closer to the point in time when the ANR happens. Bug: b/188122403 Test: Manual. 1. Enabled the flag: adb shell device_config put perfetto_error_logger append_perfetto_uuid true 2. Triggered an ANR using a test app. Logs from PerfettoTraceErrorLogger: adb logcat -s PerfettoTraceErrorLogger --------- beginning of main 04-30 14:07:02.527 1782 12583 I PerfettoTraceErrorLogger: Pushing trace counter: 6c555dc6-3f46-4997-8844-706d91156600#PerfettoMonitoredCrash 3. The UUID is present in the ANR dropbox headers: adb shell dumpsys dropbox data_app_anr --print | grep 6c555dc6-3f46-4997-8844-706d91156600 PerfettoUUID: 6c555dc6-3f46-4997-8844-706d91156600 Change-Id: If7110692cb0856e693f595e24b067ce1bc7d0a38
Loading
Please register or sign in to comment