add log to function related tbm_surface_queue 48/102348/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 5 Dec 2016 11:22:44 +0000 (20:22 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Mon, 5 Dec 2016 11:28:08 +0000 (20:28 +0900)
temp log

Change-Id: I75cf34f6a227834d48fb26d440af1cbc61774bc7

src/wayland-tbm-client.c
src/wayland-tbm-int.h
src/wayland-tbm-server.c

index 822a9a5..4d5f381 100644 (file)
@@ -187,7 +187,7 @@ handle_tbm_buffer_import_with_id(void *data,
        WL_TBM_GOTO_IF_FAIL(tbm_surface != NULL, fail);
        wl_buffer_set_user_data(wl_buffer, tbm_surface);
 
-       WL_TBM_LOG("import id wl_buffer:%u tsurface:%p", (unsigned int)wl_proxy_get_id((struct wl_proxy *)wl_buffer), tbm_surface);
+       WL_TBM_LOG_E("import id wl_buffer:%u tsurface:%p", (unsigned int)wl_proxy_get_id((struct wl_proxy *)wl_buffer), tbm_surface);
 
        snprintf(debug_id, sizeof(debug_id), "%u", (unsigned int)wl_proxy_get_id((struct wl_proxy *)wl_buffer));
        tbm_surface_internal_set_debug_data(tbm_surface, "id", debug_id);
@@ -656,6 +656,7 @@ _wayland_tbm_client_surface_queue_flush(struct wayland_tbm_surface_queue *queue_
 #ifdef DEBUG_TRACE
        WL_TBM_TRACE("pid:%d\n", getpid());
 #endif
+
        _wayland_tbm_client_queue_destory_attach_bufs(queue_info);
        tbm_surface_queue_set_size(queue_info->tbm_queue, queue_info->queue_size, 1);
 }
@@ -828,7 +829,7 @@ handle_tbm_queue_buffer_attached(void *data,
 
        WL_TBM_RETURN_IF_FAIL(wl_buffer != NULL);
 
-       WL_TBM_LOG("attached wl_buffer:%u",
+       WL_TBM_LOG_E("attached wl_buffer:%u",
                (unsigned int)wl_proxy_get_id((struct wl_proxy *)wl_buffer));
 
        buffer = calloc(1, sizeof(struct wayland_tbm_buffer));
@@ -869,6 +870,8 @@ handle_tbm_queue_active(void *data,
        struct wayland_tbm_surface_queue *queue_info =
                                (struct wayland_tbm_surface_queue *)data;
 
+       WL_TBM_LOG_E("active queue\n");
+
        if (queue_info->is_active) {
                WL_TBM_C_LOG("warning: queue_info is already activated\n");
                return;
@@ -895,6 +898,8 @@ handle_tbm_queue_deactive(void *data,
        WL_TBM_TRACE("                  pid:%d\n", getpid());
 #endif
 
+       WL_TBM_LOG_E("deactive queue\n");
+
        if (!queue_info->is_active) {
                WL_TBM_C_LOG("warning: queue_info is already deactivated\n");
                return;
@@ -916,6 +921,7 @@ handle_tbm_queue_flush(void *data,
 #ifdef DEBUG_TRACE
        WL_TBM_TRACE("pid:%d\n", getpid());
 #endif
+       WL_TBM_LOG_E("flush queue\n");
 
        if (queue_info->is_active) {
                WL_TBM_C_LOG("warning: Cannot flush the tbm_surface_queueu. The queue is activate.\n");
index e637dc1..6935f5d 100644 (file)
@@ -51,7 +51,7 @@ extern int bDlog;
 
 #define WL_TBM_C_LOG(fmt, ...) {\
        if (bDlog) {\
-               LOGI("[WL_TBM_C] " fmt, ##__VA_ARGS__);\
+               LOGE("[WL_TBM_C] " fmt, ##__VA_ARGS__);\
        } \
        else {\
                fprintf(stderr, "[WL_TBM_C(%d):%s] " fmt, getpid(), __func__, ##__VA_ARGS__);\
@@ -73,10 +73,21 @@ extern int bDlog;
                fprintf(stderr, "[WL_TBM(%d)] " fmt, getpid(), ##__VA_ARGS__);\
        } \
 }
+
+/* temp log */
+#define WL_TBM_LOG_E(fmt, ...) {\
+       if (bDlog) {\
+               LOGE("[WL_TBM] " fmt, ##__VA_ARGS__);\
+       } \
+       else {\
+               fprintf(stderr, "[WL_TBM(%d)] " fmt, getpid(), ##__VA_ARGS__);\
+       } \
+}
 #else
 #define WL_TBM_C_LOG(fmt, ...)   fprintf(stderr, "[WL_TBM_C(%d):%s] " fmt, getpid(), __func__, ##__VA_ARGS__)
 #define WL_TBM_S_LOG(fmt, ...)   fprintf(stderr, "[WL_TBM_S(%d):%s] " fmt, getpid(), __func__, ##__VA_ARGS__)
 #define WL_TBM_LOG(fmt, ...)     fprintf(stderr, "[WL_TBM(%d)] " fmt, getpid(), ##__VA_ARGS__)
+#define WL_TBM_LOG_E(fmt, ...)     fprintf(stderr, "[WL_TBM_E(%d)] " fmt, getpid(), ##__VA_ARGS__)
 #endif /* ENABLE_DLOG */
 
 #define WL_TBM_DEBUG(fmt, ...)   fprintf(stderr, "[WL_TBM:DEBUG(%d)] " fmt, getpid(), ##__VA_ARGS__)
index 4eb6aea..51aa85e 100644 (file)
@@ -1155,6 +1155,7 @@ wayland_tbm_server_client_queue_activate(struct wayland_tbm_client_queue *cqueue
 #ifdef DEBUG_TRACE
        WL_TBM_TRACE("      pid:%d\n", cqueue->pid);
 #endif
+       WL_TBM_LOG_E("send active queue pid:%d\n", cqueue->pid);
 
        wl_tbm_queue_send_active(cqueue->wl_tbm_queue, usage, queue_size, 1);
 }
@@ -1168,6 +1169,7 @@ wayland_tbm_server_client_queue_deactivate(struct wayland_tbm_client_queue *cque
 #ifdef DEBUG_TRACE
        WL_TBM_TRACE("    pid:%d\n", cqueue->pid);
 #endif
+       WL_TBM_LOG_E("send deactive queue pid:%d", cqueue->pid);
 
        wl_tbm_queue_send_deactive(cqueue->wl_tbm_queue);
 }
@@ -1216,6 +1218,8 @@ wayland_tbm_server_client_queue_export_buffer(
                (unsigned int)wl_resource_get_id(tbm_buffer->wl_buffer));
        tbm_surface_internal_set_debug_data(surface, "id", debug_id);
 
+       WL_TBM_LOG_E("export buffer pid:%d", cqueue->pid);
+
        return tbm_buffer->wl_buffer;
 }
 
@@ -1228,6 +1232,7 @@ wayland_tbm_server_client_queue_flush(struct wayland_tbm_client_queue *cqueue)
 #ifdef DEBUG_TRACE
        WL_TBM_TRACE("    pid:%d\n", cqueue->pid);
 #endif
+       WL_TBM_LOG_E("send flush queue pid:%d", cqueue->pid);
 
        wl_tbm_queue_send_flush(cqueue->wl_tbm_queue);
 }