- The flag in the .spec file, ENABLE_TTRACE default value is Zero(disable).
- If you want to use this feature, change the value of ENABLE_TTRACE zero to one(enable).
Change-Id: If03bb923700fb5a3d1e3c889e2de4138af8a7d6e
endif
ifneq ($(call is-feature-enabled,ttrace),)
- CFLAGS += -DTTRACE_ENABLE
+ CFLAGS += -DTTRACE_ENABLE=1
+ CFLAGS += `pkg-config --cflags ttrace`
+ LDFLAGS += `pkg-config --libs ttrace`
endif
ifneq ($(call is-feature-enabled,dlog),)
CFLAGS += -DDLOG_DEFAULT_ENABLE
endif
ifneq ($(call is-feature-enabled,pngdump),)
CFLAGS += -DPNG_DUMP_ENABLE
- LDFLAGS += `pkg-config libpng`
+ CFLAGS += `pkg-config --cflags libpng`
+ LDFLAGS += `pkg-config --libs libpng`
endif
ifneq ($(call is-feature-enabled,arm_atomic_operation),)
BuildRequires: pkgconfig(libpng)
%endif
+%if "%{ENABLE_TTRACE}" == "1"
+BuildRequires: pkgconfig(ttrace)
+%endif
+
%global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
%description
tbm_surface_h tbm_surface, int num_rects,
const int *rects)
{
+ tbm_bo bo;
+
TPL_ASSERT(surface);
TPL_ASSERT(surface->display);
TPL_ASSERT(surface->display->native_handle);
return TPL_ERROR_INVALID_PARAMETER;
}
- tbm_bo_handle bo_handle =
- tbm_bo_get_handle(tbm_surface_internal_get_bo(tbm_surface, 0),
- TBM_DEVICE_CPU);
+ bo = tbm_surface_internal_get_bo(tbm_surface, 0);
+ tbm_bo_handle bo_handle = tbm_bo_get_handle(bo, TBM_DEVICE_CPU);
if (bo_handle.ptr)
TPL_IMAGE_DUMP(bo_handle.ptr, surface->width, surface->height,
return TPL_ERROR_INVALID_PARAMETER;
}
+ TRACE_MARK("[ENQ] BO_NAME:%d", tbm_bo_export(bo));
return TPL_ERROR_NONE;
}
gbm_surface = (tpl_gbm_surface_t *)surface->backend.data;
+ TRACE_BEGIN("WAITING FOR DEQUEUEABLE");
tsq_err = tbm_surface_queue_dequeue(gbm_surface->tbm_queue, &tbm_surface);
if (!tbm_surface
&& tbm_surface_queue_can_dequeue(gbm_surface->tbm_queue, 1) == 1) {
if (!tbm_surface) {
TPL_ERR("Failed to get tbm_surface from tbm_surface_queue | tsq_err = %d",
tsq_err);
+ TRACE_END();
return NULL;
}
}
+ TRACE_END();
/* Inc ref count about tbm_surface */
/* It will be dec when before tbm_surface_queue_enqueue called */
tbm_surface_internal_ref(tbm_surface);
gbm_buffer = __tpl_gbm_get_gbm_buffer_from_tbm_surface(tbm_surface);
- if (gbm_buffer) return tbm_surface;
+ if (gbm_buffer)
+ {
+ TRACE_MARK("[DEQ][REUSED]BO_NAME:%d",tbm_bo_export(gbm_buffer->bo));
+ return tbm_surface;
+ }
if (!(bo = tbm_surface_internal_get_bo(tbm_surface, 0))) {
TPL_ERR("Failed to get tbm_bo from tbm_surface");
__tpl_gbm_set_gbm_buffer_to_tbm_surface(tbm_surface, gbm_buffer);
+ TRACE_MARK("[DEQ][NEW]BO_NAME:%d",tbm_bo_export(gbm_buffer->bo));
+
return tbm_surface;
}
return TPL_FALSE;
}
- TRACE_BEGIN("TPL:VALIDATEFRAME");
TPL_OBJECT_LOCK(surface);
if (!surface->backend.validate(surface)) was_valid = TPL_FALSE;
TPL_OBJECT_UNLOCK(surface);
- TRACE_END();
return was_valid;
}
return NULL;
}
- TRACE_BEGIN("TPL:GETBUFFER");
+ TRACE_BEGIN("TPL:DEQUEUE_BUFFER");
TPL_OBJECT_LOCK(surface);
tbm_surface = surface->backend.dequeue_buffer(surface);
return TPL_ERROR_INVALID_PARAMETER;
}
- TRACE_BEGIN("TPL:POST");
+ TRACE_BEGIN("TPL:ENQUEUE_BUFFER");
TPL_OBJECT_LOCK(surface);
if (!tbm_surface) {
return TPL_ERROR_INVALID_PARAMETER;
}
- TRACE_BEGIN("TPL:POST");
+ TRACE_BEGIN("TPL:ENQUEUE_BUFFER_WITH_DAMAGE");
TPL_OBJECT_LOCK(surface);
if (!tbm_surface) {
#include <ttrace.h>
#define TRACE_BEGIN(name,...) traceBegin(TTRACE_TAG_GRAPHICS, name, ##__VA_ARGS__)
#define TRACE_END() traceEnd(TTRACE_TAG_GRAPHICS)
-#define TRACE_ASYNC_BEGIN(key, name) traceAsyncBegin(TTRACE_TAG_GRAPHICS, key, name)
-#define TRACE_ASYNC_END(key, name) traceAsyncEnd(TTRACE_TAG_GRAPHICS, key, name)
+#define TRACE_ASYNC_BEGIN(key, name,...) traceAsyncBegin(TTRACE_TAG_GRAPHICS, key, name, ##__VA_ARGS__)
+#define TRACE_ASYNC_END(key, name,...) traceAsyncEnd(TTRACE_TAG_GRAPHICS, key, name, ##__VA_ARGS__)
#define TRACE_COUNTER(value, name,...) traceCounter(TTRACE_TAG_GRAPHICS, value, name, ##__VA_ARGS__)
#define TRACE_MARK(name,...) traceMark(TTRACE_TAG_GRAPHICS, name, ##__VA_ARGS__)
#else
#define TRACE_BEGIN(name,...)
#define TRACE_END()
-#define TRACE_ASYNC_BEGIN(key, name)
-#define TRACE_ASYNC_END(key, name)
+#define TRACE_ASYNC_BEGIN(key, name,...)
+#define TRACE_ASYNC_END(key, name,...)
#define TRACE_COUNTER(value, name,...)
#define TRACE_MARK(name,...)
#endif
__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));
tbm_bo_handle bo_handle =
tbm_bo_get_handle(wayland_egl_buffer->bo , TBM_DEVICE_CPU);
wl_surface_commit(wl_egl_window->surface);
wl_display_flush((struct wl_display *)surface->display->native_handle);
+
+ TRACE_ASYNC_BEGIN((int)tbm_surface, "[COMMIT ~ RELEASE_CB] BO_NAME:%d",
+ tbm_bo_export(wayland_egl_buffer->bo));
}
tbm_surface_queue_error_e tsq_err;
TPL_LOG(3, "window(%p, %p)", surface, surface->native_handle);
+ TRACE_MARK("[ENQ] BO_NAME:%d",
+ tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
tsq_err = tbm_surface_queue_enqueue(wayland_egl_surface->tbm_queue,
tbm_surface);
wl_display_dispatch_queue_pending((struct wl_display *)
surface->display->native_handle,
wayland_egl_display->wl_queue);
+ TRACE_BEGIN("WAITING FOR DEQUEUEABLE");
while (tbm_surface_queue_can_dequeue(
wayland_egl_surface->tbm_queue, 0) == 0) {
/* Application sent all buffers to the server. Wait for server response. */
return NULL;
}
}
+ TRACE_END();
TPL_OBJECT_LOCK(surface);
tsq_err = tbm_surface_queue_dequeue(wayland_egl_surface->tbm_queue,
if ((wayland_egl_buffer =
__tpl_wayland_egl_get_wayland_buffer_from_tbm_surface(tbm_surface)) != NULL) {
+ TRACE_MARK("[DEQ][REUSED]BO_NAME:%d",tbm_bo_export(wayland_egl_buffer->bo));
+ TRACE_ASYNC_BEGIN((int)wayland_egl_buffer, "[DEQ]~[ENQ] BO_NAME:%d",
+ tbm_bo_export(wayland_egl_buffer->bo));
return tbm_surface;
}
__tpl_wayland_egl_set_wayland_buffer_to_tbm_surface(tbm_surface,
wayland_egl_buffer);
+ TRACE_MARK("[DEQ][NEW]BO_NAME:%d",tbm_bo_export(wayland_egl_buffer->bo));
+ TRACE_ASYNC_BEGIN((int)wayland_egl_buffer, "[DEQ]~[ENQ] BO_NAME:%d",
+ tbm_bo_export(wayland_egl_buffer->bo));
return tbm_surface;
}
tbm_surface = (tbm_surface_h) data;
+ TRACE_ASYNC_END((int)tbm_surface, "[COMMIT ~ RELEASE_CB] BO_NAME:%d",
+ tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
/* If tbm_surface_queue reset/destroy before this callback
* tbm_surface will be not used any more.
* So, it should be detroyed before getting its user_data */