Added TRACE at the missed point. 44/203944/2
authorJoonbum Ko <joonbum.ko@samsung.com>
Thu, 18 Apr 2019 07:39:43 +0000 (16:39 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 7 May 2019 00:12:20 +0000 (00:12 +0000)
Change-Id: I70f6bdd58f2962b4e9b9224eda2c83545b4b1ee3
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_tbm.c
src/tpl_wayland_egl.c

index df39918..5fbf2e9 100644 (file)
@@ -536,6 +536,8 @@ __tpl_tbm_surface_enqueue_buffer(tpl_surface_t *surface,
                return TPL_ERROR_INVALID_PARAMETER;
        }
 
+       TRACE_ASYNC_END((void *)tbm_surface, "[DEQ]~[ENQ] BO(%d)", tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
+
        tbm_surface_internal_unref(tbm_surface);
 
        if (surface->type == TPL_SURFACE_TYPE_PIXMAP) {
@@ -686,6 +688,8 @@ __tpl_tbm_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns,
                          surface, tbm_queue, tbm_surface,
                          tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
 
+       TRACE_ASYNC_BEGIN((void *)tbm_surface, "[DEQ]~[ENQ] BO(%d)", tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
+
        return tbm_surface;
 }
 
index f9debe1..80a2812 100644 (file)
@@ -824,8 +824,7 @@ __tpl_wayland_egl_surface_commit(tpl_surface_t *surface,
                __tpl_wayland_egl_get_wayland_buffer_from_tbm_surface(tbm_surface);
        TPL_ASSERT(wayland_egl_buffer);
 
-       TRACE_ASYNC_END((int)wayland_egl_buffer, "[DEQ]~[ENQ] BO_NAME:%d",
-                                       tbm_bo_export(wayland_egl_buffer->bo));
+       TRACE_MARK("[COMMIT] BO_NAME:%d", tbm_bo_export(wayland_egl_buffer->bo));
 
        TPL_IMAGE_DUMP(tbm_surface, surface->width, surface->height);
 
@@ -998,9 +997,6 @@ __tpl_wayland_egl_surface_enqueue_buffer(tpl_surface_t *surface,
 
        wayland_egl_buffer->is_new = TPL_FALSE;
 
-       if (wayland_egl_surface->vblank_done == TPL_FALSE)
-               __tpl_wayland_egl_surface_wait_vblank(surface);
-
        if (sync_fence != -1) {
                tbm_sync_fence_wait(sync_fence, -1);
                close(sync_fence);
@@ -1022,6 +1018,14 @@ __tpl_wayland_egl_surface_enqueue_buffer(tpl_surface_t *surface,
                return TPL_ERROR_INVALID_OPERATION;
        }
 
+       TRACE_ASYNC_END((int)wayland_egl_buffer, "[DEQ]~[ENQ] BO_NAME:%d",
+                                       tbm_bo_export(wayland_egl_buffer->bo));
+
+       TRACE_BEGIN("[WAIT_VBLANK]");
+       if (wayland_egl_surface->vblank_done == TPL_FALSE)
+               __tpl_wayland_egl_surface_wait_vblank(surface);
+       TRACE_END();
+
        tsq_err = tbm_surface_queue_acquire(wayland_egl_surface->tbm_queue,
                                                                                &tbm_surface);
        if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE) {