Add app-side event lifetime tracing
This should help figure out / confirm whether there are bugs in the application input event consumption code. In this trace, we are adding app-process "InputConsumer processing" tag, with the cookie = sequence number of the input event. In this context, input events include everything, like key events, motion events, focus events, etc. In other words, anything that's being sent from the InputDispatcher to the receiving window. When the "finish" is finally successfully written into the fd, we end the trace. Therefore, in cases of batching, we would see a few of these events pile up, until we finally produce a frame that captures all of them. It would also be interesting to add some app-side benchmarks for this. We currently collect those in https://pitot-autopush.corp.google.com/metric_index/Touch%20latency but they are not broken down by the application. Test procedure: 1. Add "system tracing" to quick settings from developer options (enable the quick settings tile for system tracing) 2. Start system tracing via UI of quick settings 3. Open all apps and do some swipes 4. Click "stop tracing" 5. Pull the logs to the device `adb pull /data/local/traces/ ~/trace` 6. Go to https://ui.perfetto.dev/ 7. Click "open trace file" and navigate to the local file 8. In the trace, open the process of interest. In this case, it's the launcher process 9. Scroll down to "InputConsumer processing" 10. The "cookie" field of each entry is the sequence number of this event (but not the event id). Bug: 319884471 Test: see procedure Change-Id: I569d8be51ac7b14f8bf54a00bf027323b96b9808
Loading
Please register or sign in to comment