Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36b86719 authored by Harry Cutts's avatar Harry Cutts
Browse files

EventHub: add raw events to input traces

Adding raw events to traces will make it much easier to debug issues
lower down in the input stack than our current dispatcher-level tracing
allows, such as problems with input mappers, and to determine whether
the input device itself is working properly.

Bug: 394861376
Test: record an input trace:
    $ echo 'buffers: { size_kb: 100000 fill_policy: RING_BUFFER }
      data_sources: {
          config {
              name: "android.input.inputevent"
              android_input_event_config { mode: TRACE_MODE_TRACE_ALL }
          }
      }
      data_sources: {
          config {
              name: "android.surfaceflinger.layers"
              surfaceflinger_layers_config: {
                  mode: MODE_ACTIVE
                  trace_flags: TRACE_FLAG_INPUT
                  trace_flags: TRACE_FLAG_COMPOSITION
                  trace_flags: TRACE_FLAG_HWC
                  trace_flags: TRACE_FLAG_BUFFERS
                  trace_flags: TRACE_FLAG_VIRTUAL_DISPLAYS
              }
          }
      }
      duration_ms: 20000
      ' | adb shell perfetto -c - --txt \
          -o /data/misc/perfetto-traces/input.perfetto-trace
    Then use Perfetto's traceconv to convert the trace to text protos,
    and check for evdev_event entries.
Test: $ atest inputflinger_test
Test: $ m checkinput
Flag: com.android.input.flags.low_level_tracing

Change-Id: I5e833fbfec63beac0308a762f691463987d09478
parent eb4d9e2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment