diff --git a/cr-dump.c b/cr-dump.c index 806544d6d..3af077b0b 100644 --- a/cr-dump.c +++ b/cr-dump.c @@ -1546,7 +1546,6 @@ int cr_dump_tasks(pid_t pid) if (ret) goto err; - fd_id_show_tree(); err: if (disconnect_from_page_server()) ret = -1; diff --git a/file-ids.c b/file-ids.c index 3226d159e..78e270778 100644 --- a/file-ids.c +++ b/file-ids.c @@ -22,11 +22,6 @@ static DECLARE_KCMP_TREE(fd_tree, KCMP_FILE); -void fd_id_show_tree(void) -{ - kid_show_tree(&fd_tree); -} - #define FDID_BITS 5 #define FDID_SIZE (1 << FDID_BITS) #define FDID_MASK (FDID_SIZE - 1) diff --git a/include/file-ids.h b/include/file-ids.h index 6323d98bd..2da4ceffd 100644 --- a/include/file-ids.h +++ b/include/file-ids.h @@ -16,6 +16,5 @@ struct stat; struct fd_parms; extern int fd_id_generate(pid_t pid, FdinfoEntry *fe, struct fd_parms *p); extern int fd_id_generate_special(struct fd_parms *p, u32 *id); -extern void fd_id_show_tree(void); #endif /* __CR_FILE_IDS_H__ */ diff --git a/include/kcmp-ids.h b/include/kcmp-ids.h index e9e91014d..afe68d6d3 100644 --- a/include/kcmp-ids.h +++ b/include/kcmp-ids.h @@ -25,6 +25,5 @@ struct kid_elem { extern u32 kid_generate_gen(struct kid_tree *tree, struct kid_elem *elem, int *new_id); -extern void kid_show_tree(struct kid_tree *tree); #endif /* __CR_KCMP_IDS_H__ */ diff --git a/kcmp-ids.c b/kcmp-ids.c index f082d9730..9755969b3 100644 --- a/kcmp-ids.c +++ b/kcmp-ids.c @@ -56,59 +56,6 @@ struct kid_entry { struct kid_elem elem; } __aligned(sizeof(long)); -static void show_subnode(struct rb_node *node, int self) -{ - struct kid_entry *this = rb_entry(node, struct kid_entry, subtree_node); - - pr_info("\t\t| %#x.%#x %s\n", this->elem.genid, this->subid, - self ? "(self)" : ""); - if (node->rb_left) { - pr_info("\t\t| left:\n"); - show_subnode(node->rb_left, 0); - pr_info("\t\t| --l\n"); - } - if (node->rb_right) { - pr_info("\t\t| right:\n"); - show_subnode(node->rb_right, 0); - pr_info("\t\t| --r\n"); - } -} - -static void show_subtree(struct rb_root *root) -{ - pr_info("\t\t| SubTree\n"); - show_subnode(root->rb_node, 1); -} - -static void show_node(struct rb_node *node) -{ - struct kid_entry *this = rb_entry(node, struct kid_entry, node); - - pr_info("\t%#x.%#x\n", this->elem.genid, this->subid); - if (node->rb_left) { - pr_info("\tleft:\n"); - show_node(node->rb_left); - pr_info("\t--l\n"); - } - if (node->rb_right) { - pr_info("\tright:\n"); - show_node(node->rb_right); - pr_info("\t--r\n"); - } - - show_subtree(&this->subtree_root); - pr_info("\t--s\n"); -} - -void kid_show_tree(struct kid_tree *tree) -{ - struct rb_root *root = &tree->root; - - pr_info("\tTree of %d objects\n", tree->kcmp_type); - if (root->rb_node) - show_node(root->rb_node); -} - static struct kid_entry *alloc_kid_entry(struct kid_tree *tree, struct kid_elem *elem) { struct kid_entry *e;