wl_egl: add surf_trace_begin/end 54/318754/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 8 Oct 2024 00:50:19 +0000 (09:50 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Tue, 8 Oct 2024 02:16:29 +0000 (11:16 +0900)
commitb7459344164e2349559a596d3803ca005898ebe5
tree31b60b48ca7cb4283a5a4d87db09ea03c02f162f
parentcb33bb9e3306135b40f0965270107d5fbd701579
wl_egl: add surf_trace_begin/end

 - By using the surface, it was possible to measure what was ambiguous
  to be measured using the change in buffer state (like below)
  LAST_COMMIT ~ RELEASE : Delay in buffer release event from server
  LAST_RELEASE ~ DEQUEUE : Delay in rendering job from EGL caller

 - enum surface_trace_period has been added
  INITIALIZING
   - to check the total elapsed time until surface_init done
  LAST_REL_TO_DEQ_REQUESTED
   - the period from when last buffer release to when dequeue is requested
   - to check if there is a delay in rendering requests between frames
  DEQ_REQUEST_TO_DEQ_DONE
   - The period from when can_dequeue is called to when dequeue is completed
  WAIT_VBL_TO_VBL_DONE
   - The period from when wait_vblank to when vblank done callback is called
   - to check if there is a delay in client vblank event processing
  LAST_COMMIT_TO_REL
   - The period from when the last surface commit to when
    buffer release event processed
   - to check if there is a delay in server or thread's event processing

 - For each trace_period, even if _surf_trace_begin is called multiple times,
  only the last call will be recorded and calling _surf_trace_end calculates
  the elapsed time for that period.

Change-Id: I62fb3617faa3c823d56404414b9dc68fd2a84f91
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c