mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
plugins/amdgpu: remove excessive debug messages
These pr_info lines begin with "CC3" and "TWI" were not meant to be included in the patch. Co-authored-by: Andrei Vagin <avagin@google.com> Signed-off-by: David Francis <David.Francis@amd.com> Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
parent
9e404e2083
commit
ff35a9126e
4 changed files with 8 additions and 29 deletions
|
|
@ -48,6 +48,7 @@
|
|||
#include "image.h"
|
||||
#include "cr_options.h"
|
||||
#include "util.h"
|
||||
|
||||
struct vma_metadata {
|
||||
struct list_head list;
|
||||
uint64_t old_pgoff;
|
||||
|
|
@ -327,8 +328,6 @@ void getenv_size_t(const char *var, size_t *value)
|
|||
int sh = 0;
|
||||
size_t size;
|
||||
|
||||
pr_info("Value str: %s\n", value_str);
|
||||
|
||||
if (value_str) {
|
||||
size = (size_t)strtoul(value_str, &endp, 0);
|
||||
if (errno || value_str == endp) {
|
||||
|
|
@ -1132,7 +1131,6 @@ int amdgpu_restore_init(void)
|
|||
if (d) {
|
||||
while ((dir = readdir(d)) != NULL) {
|
||||
if (strncmp("amdgpu-kfd-", dir->d_name, strlen("amdgpu-kfd-")) == 0) {
|
||||
pr_info("CC3: Found kfd file\n");
|
||||
img_fp = open_img_file(dir->d_name, false, &img_size);
|
||||
buf = xmalloc(img_size);
|
||||
if (!buf) {
|
||||
|
|
@ -1155,7 +1153,6 @@ int amdgpu_restore_init(void)
|
|||
xfree(buf);
|
||||
}
|
||||
if (strncmp("amdgpu-renderD-", dir->d_name, strlen("amdgpu-renderD-")) == 0) {
|
||||
pr_info("CC3: Found drm file\n");
|
||||
img_fp = open_img_file(dir->d_name, false, &img_size);
|
||||
buf = xmalloc(img_size);
|
||||
if (!buf) {
|
||||
|
|
|
|||
|
|
@ -55,8 +55,6 @@ int __amdgpu_plugin_dmabuf_dump(int dmabuf_fd, int id)
|
|||
unsigned char *buf = NULL;
|
||||
int gem_handle;
|
||||
|
||||
pr_info("TWI: Dumping dmabuf fd = %d\n", dmabuf_fd);
|
||||
|
||||
gem_handle = handle_for_shared_bo_fd(dmabuf_fd);
|
||||
if (gem_handle < 0) {
|
||||
pr_err("Failed to get handle for dmabuf_fd = %d\n", dmabuf_fd);
|
||||
|
|
@ -107,8 +105,6 @@ int amdgpu_plugin_dmabuf_restore(int id)
|
|||
|
||||
snprintf(path, sizeof(path), IMG_DMABUF_FILE, id);
|
||||
|
||||
pr_info("TWI: Restoring dmabuf fd, id = %d\n", id);
|
||||
|
||||
/* Read serialized metadata */
|
||||
img_fp = open_img_file(path, false, &img_size);
|
||||
if (!img_fp) {
|
||||
|
|
@ -139,29 +135,23 @@ int amdgpu_plugin_dmabuf_restore(int id)
|
|||
}
|
||||
fclose(img_fp);
|
||||
|
||||
pr_info("TWI: dmabuf node gem_handle = %d\n", rd->gem_handle);
|
||||
|
||||
/* Match GEM handle with shared_dmabuf list */
|
||||
fd_id = amdgpu_id_for_handle(rd->gem_handle);
|
||||
if (fd_id == -1) {
|
||||
pr_err("Failed to find dmabuf_fd for GEM handle = %d\n",
|
||||
rd->gem_handle);
|
||||
pr_err("Failed to find dmabuf_fd for GEM handle = %d\n", rd->gem_handle);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int dmabuf_fd = fdstore_get(fd_id);
|
||||
pr_info("TWI: dmabuf node fd_id = %d, dmabuf_fd = %d\n", fd_id, dmabuf_fd);
|
||||
if (dmabuf_fd == -1) {
|
||||
pr_err("Failed to find dmabuf_fd for GEM handle = %d\n",
|
||||
rd->gem_handle);
|
||||
pr_err("Failed to find dmabuf_fd for GEM handle = %d\n", rd->gem_handle);
|
||||
return 1; /* Retry needed */
|
||||
} else {
|
||||
pr_info("Restored dmabuf_fd = %d for GEM handle = %d\n",
|
||||
dmabuf_fd, rd->gem_handle);
|
||||
}
|
||||
|
||||
pr_info("Restored dmabuf_fd = %d for GEM handle = %d\n", dmabuf_fd, rd->gem_handle);
|
||||
ret = dmabuf_fd;
|
||||
|
||||
pr_info("Successfully restored dmabuf_fd %d\n",
|
||||
dmabuf_fd);
|
||||
pr_info("Successfully restored dmabuf_fd %d\n", dmabuf_fd);
|
||||
criu_dmabuf_node__free_unpacked(rd, NULL);
|
||||
xfree(buf);
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -466,7 +466,6 @@ int amdgpu_plugin_drm_restore_file(int fd, CriuRenderNode *rd)
|
|||
if (work_already_completed(boinfo->handle, rd->drm_render_minor)) {
|
||||
continue;
|
||||
} else if (boinfo->handle != -1) {
|
||||
pr_info("TWI: restore bo %d\n", boinfo->handle);
|
||||
if (boinfo->is_import) {
|
||||
fd_id = amdgpu_id_for_handle(boinfo->handle);
|
||||
if (fd_id == -1) {
|
||||
|
|
@ -474,13 +473,11 @@ int amdgpu_plugin_drm_restore_file(int fd, CriuRenderNode *rd)
|
|||
continue;
|
||||
}
|
||||
dmabuf_fd = fdstore_get(fd_id);
|
||||
pr_info("TWI: restore bo %d: fd_id %d, dmabuf_fd %d\n", boinfo->handle, fd_id, dmabuf_fd);
|
||||
}
|
||||
}
|
||||
|
||||
if (boinfo->is_import) {
|
||||
drmPrimeFDToHandle(device_fd, dmabuf_fd, &handle);
|
||||
pr_info("TWI: restore bo imported to handle %d\n", handle);
|
||||
} else {
|
||||
union drm_amdgpu_gem_create create_args = { 0 };
|
||||
|
||||
|
|
@ -497,7 +494,6 @@ int amdgpu_plugin_drm_restore_file(int fd, CriuRenderNode *rd)
|
|||
handle = create_args.out.handle;
|
||||
|
||||
drmPrimeHandleToFD(device_fd, handle, 0, &dmabuf_fd);
|
||||
pr_info("TWI: restore bo created at handle %d and exported to fd %d\n", handle, dmabuf_fd);
|
||||
}
|
||||
|
||||
change_args.handle = handle;
|
||||
|
|
|
|||
|
|
@ -135,13 +135,9 @@ int handle_for_shared_bo_fd(int fd)
|
|||
if (trial_handle < 0)
|
||||
continue;
|
||||
|
||||
pr_info("TWI: Check device %d, got handle %d\n", df->fd, trial_handle);
|
||||
|
||||
list_for_each_entry(bo, &shared_bos, l) {
|
||||
if (bo->handle == trial_handle) {
|
||||
pr_info("TWI: And that handle exists\n");
|
||||
if (bo->handle == trial_handle)
|
||||
return trial_handle;
|
||||
}
|
||||
}
|
||||
|
||||
amdgpu_device_deinitialize(h_dev);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue