{
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[],
_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);
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))
}
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);
}
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;
}
}