首先打开camera kernel trace
adb shell "echo 1 > /d/tracing/events/camera/enable"
Camera kernel的trace定义在:techpack/camera/drivers/cam_utils/cam_trace.h
然后抓systrace, 通过notepad++打开,搜索"cam_isp_activated_irq.*event=1"
<...>-140 ( 140) [001] ..s1 13851.434841: cam_isp_activated_irq: ISP: IRQ ctx=00000000d86ea01d ctx_state=5 substate=1 event=1 ts=13866669212135 <idle>-0 (-------) [001] ..s2 13851.474870: cam_isp_activated_irq: ISP: IRQ ctx=00000000d86ea01d ctx_state=5 substate=1 event=1 ts=13866709252187 <idle>-0 (-------) [001] ..s2 13851.514918: cam_isp_activated_irq: ISP: IRQ ctx=00000000d86ea01d ctx_state=5 substate=1 event=1 ts=13866749292187
这里的event定义如下:
/** * enum cam_isp_hw_event_type - Collection of the ISP hardware events */ enum cam_isp_hw_event_type { CAM_ISP_HW_EVENT_ERROR, CAM_ISP_HW_EVENT_SOF, CAM_ISP_HW_EVENT_REG_UPDATE, CAM_ISP_HW_EVENT_EPOCH, CAM_ISP_HW_EVENT_EOF, CAM_ISP_HW_EVENT_DONE, CAM_ISP_HW_EVENT_MAX };