Move InputEventReceiver tracing to native code
InputEventReceiver.dispatchInputEvent is called with relatively high frequency. Even when guarding the associated trace call and string creation, it was showing up as a significant source of StringBuilder and JNI overhead for some common traced scenarios. Move the trace calls into native where `dispatchInputEvent` is invoked. MotionEvent itself is backed by native data structures, so associated member field queries are even cheaper when we do this tracing natively. Bug: 444721071 Test: presubmit Test: ./record_android_trace -c syshealth.pbtx + compare traces Flag: EXEMPT PURE_REFACTOR Change-Id: I7bf72a8a83418ab4e987a87e288566e10f782058
Loading
Please register or sign in to comment