Reputation: 312
I need to measure Android kernel and framework processing time for mouse HID event.
printk()
on
hid_irq_in()
, hid_input_report()
in hid-core.cclock_gettime(CLOCK_BOOTTIME)
on InputReader::process.Log.d() elapsedRealtimeNanos()
on View.OnTouchListenerProblem: App side onTouchListner time is 60ms earlier than kernel hid_irq_in()
. kernel IRQ should be 1-2ms before onTouchListener.
I am not sure why time is reverted. If I use not accurate way to get time, let me know.
Upvotes: 0
Views: 115
Reputation: 312
"dmesg" add timestamp of printk()
message. But that time is not synced with clock_gettime(CLOCK_BOOTTIME)
in userland.
I need to call ktime_get_boottime()
then printk()
in kernel code. That time is synced with clock_gettime(CLOCK_BOOTTIME)
in userland.
With this measurement, I found handling mouse left click event takes 3ms in kernel and framework.
Upvotes: 0