show the dump path on the console. 03/173703/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 23 Mar 2018 08:29:56 +0000 (17:29 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 23 Mar 2018 08:29:56 +0000 (17:29 +0900)
Change-Id: I5c3582ad920e1c1fbaf00e43f97c823e8dfed633

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

index 1694b7a..847344b 100644 (file)
@@ -294,14 +294,17 @@ void _waylend_tbm_monitor_client_dump_snapshot(int argc, char *argv[],
 {
        double scale = 0;
        int i;
+       char *path = NULL;
 
        for (i = 1; i < argc; i++) {
                if (_waylend_tbm_util_scale_parse(argv[i], &scale))
                        break;
        }
 
-       _waylend_tbm_util_dump_snapshot(tbm_client->bufmgr, scale);
-       WL_TBM_MONITOR_SNPRINTF(reply, *len, "client(%d): snapshot dump is done\n", getpid());
+       path = _wayland_tbm_dump_directory_make();
+       _waylend_tbm_util_dump_snapshot(tbm_client->bufmgr, scale, path);
+       WL_TBM_MONITOR_SNPRINTF(reply, *len, "client(%d): snapshot dump is done. path=%s\n", getpid(), path);
+       free(path);
 }
 
 void _waylend_tbm_monitor_client_dump_queue(int argc, char *argv[],
index 601acc3..6ca7c06 100644 (file)
@@ -192,7 +192,7 @@ int
 _waylend_tbm_util_dump_queue(WL_TBM_MONITOR_PROC_STATE cmd, tbm_bufmgr bufmgr, double scale);
 
 void
-_waylend_tbm_util_dump_snapshot(tbm_bufmgr bufmgr, double scale);
+_waylend_tbm_util_dump_snapshot(tbm_bufmgr bufmgr, double scale, char *path);
 
 int
 _waylend_tbm_util_trace(WL_TBM_MONITOR_PROC_STATE cmd, tbm_bufmgr bufmgr);
index 089e168..baddc2e 100644 (file)
@@ -366,6 +366,7 @@ _waylend_tbm_monitor_server_dump_snapshot(struct wayland_tbm_monitore_request *r
        struct wayland_tbm_monitor_target target = {.all = 1, .server = 1, .pid = {0} };
        double scale = 0;
        int i;
+       char *path = NULL;
 
        for (i = 1; i < r->argc; i++) {
                if (_waylend_tbm_util_target_parse(r->argv[i], &target))
@@ -379,8 +380,10 @@ _waylend_tbm_monitor_server_dump_snapshot(struct wayland_tbm_monitore_request *r
        }
 
        if (target.server) {
-               _waylend_tbm_util_dump_snapshot(r->tbm_srv->bufmgr, scale);
-               _wayland_tbm_monitor_request_printf(r, "server: snapshot dump is done\n");
+               path = _wayland_tbm_dump_directory_make();
+               _waylend_tbm_util_dump_snapshot(r->tbm_srv->bufmgr, scale, path);
+               _wayland_tbm_monitor_request_printf(r, "server: snapshot dump is done. path=%s\n", path);
+               free(path);
        }
        _send_request_to_client_with_wait(r, &target, 1);
 }
index 3228e90..4d63a56 100644 (file)
@@ -174,14 +174,11 @@ _waylend_tbm_util_trace(WL_TBM_MONITOR_PROC_STATE cmd, tbm_bufmgr bufmgr)
        return bTrace;
 }
 void
-_waylend_tbm_util_dump_snapshot(tbm_bufmgr bufmgr, double scale)
+_waylend_tbm_util_dump_snapshot(tbm_bufmgr bufmgr, double scale, char *path)
 {
-       char *path = _wayland_tbm_dump_directory_make();
        if (path) {
                tbm_bufmgr_debug_dump_set_scale(scale);
                tbm_bufmgr_debug_dump_all(path);
-               free(path);
-               path = NULL;
        }
 }