diff options
author | Super Liu <supercjliu@google.com> | 2022-12-29 02:28:50 +0000 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2022-12-30 01:40:58 +0000 |
commit | 982a02f9e69403c2ad1dbfec8017a67468969205 (patch) | |
tree | 9e492bd182d218aad04542f9b82a71e5c4762e6e | |
parent | 80d189b0dc6e2bb3ff87f2228fba8416f5cb19a9 (diff) | |
download | common-982a02f9e69403c2ad1dbfec8017a67468969205.tar.gz |
gti: add atrace for offload input report.android-t-qpr2-beta-3_r0.5android-t-qpr2-beta-3_r0.4android-t-qpr2-beta-3_r0.3android-t-qpr2-beta-3.2_r0.6android-t-qpr2-beta-3.2_r0.5android-13.0.0_r0.64android-gs-raviole-5.10-android13-qpr2-betaandroid-gs-pantah-5.10-t-qpr2-beta-3.2android-gs-pantah-5.10-android13-qpr2-betaandroid-gs-bluejay-5.10-t-qpr2-beta-3android-gs-bluejay-5.10-android13-qpr2-beta
Bug: 263444046
Change-Id: If852d8ca661db78712e44bb8305537ddf415688b
Signed-off-by: Super Liu <supercjliu@google.com>
-rw-r--r-- | goog_touch_interface.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c index 4e71d24..85c4dd5 100644 --- a/goog_touch_interface.c +++ b/goog_touch_interface.c @@ -2135,7 +2135,8 @@ void goog_offload_populate_frame(struct goog_touch_interface *gti, u16 rx = gti->offload.caps.rx_size; struct gti_sensor_data_cmd *cmd = >i->cmd.sensor_data_cmd; - scnprintf(trace_tag, sizeof(trace_tag), "%s: index=%llu\n", __func__, index); + scnprintf(trace_tag, sizeof(trace_tag), "%s: IDX=%llu IN_TS=%lld.\n", + __func__, index, gti->input_timestamp); ATRACE_BEGIN(trace_tag); frame->header.index = index++; @@ -2278,8 +2279,15 @@ void goog_offload_input_report(void *handle, int i; int error; unsigned long slot_bit_active = 0; + char trace_tag[128]; + ktime_t ktime = ktime_get(); - ATRACE_BEGIN(__func__); + scnprintf(trace_tag, sizeof(trace_tag), + "%s: IDX=%lld IN_TS=%lld TS=%lld DELTA=%lld ns.\n", + __func__, report->index, + ktime_to_ns(report->timestamp), ktime_to_ns(ktime), + ktime_to_ns(ktime_sub(ktime, report->timestamp))); + ATRACE_BEGIN(trace_tag); goog_input_lock(gti); input_set_timestamp(gti->vendor_input_dev, report->timestamp); |