Only query Perfetto state at boot when necessary.
When we update the tracing state, we check both: - Whether the user has enabled tracing - Whether a trace is currently in progress And then update the two to match. In order to check whether a trace is currently in progress, we need to start the Perfetto process and query it. We know that Perfetto will not automatically start a Traceur trace at boot by itself, so we can skip this query at boot time and assume it'll return false. Since the system is under so much load at boot, this query was occasionally causing Traceur to ANR, so it's worthwhile to skip it when possible. Bug: 135610481 Test: atest TraceurUiTests & manual testing Change-Id: Ie29ab6cc7f2f993bd6a0f33c44dc99410ccf95e8
Loading
Please sign in to comment