Reduce ambiguity of trace from intent to launch activity
Because the launching activities can be floating/translucent/ in different displays/in multiple window mode, there could be multiple launching traces at the same time. The trace processor relied on "MetricsLogger:launchObserverNotifyIntentStarted" and "MetricsLogger:launchObserverNotifyActivityLaunchFinished", which didn't provide enough information to know which startup it belongs to. With keeping the old trace for migrating, a new async trace is added: launchingActivity#$seqId. It has the same meaning as the "Android App startups" by trace processor. And there will be another trace when the launch is done to indicate the result. E.g. Activity not found: launchingActivity#1:failed Becomes invisible before reporting drawn: launchingActivity#1:canceled:the.pkg.name Successful shown: launchingActivity#1:completed:the.pkg.name So the trace processor can search "launchingActivity#$id:completed:" to get the launched package name and associate "launchingActivity#$id" to show directly. Bug: 222576471 Test: Launch an app with "external/perfetto/tools/record_android_trace am". Change-Id: Ifa78e04f79605db27d7fd2a5f582d286ceae2a13
Loading
Please register or sign in to comment