diff options
Diffstat (limited to 'src/btree/bt_debug.c')
-rw-r--r-- | src/btree/bt_debug.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/btree/bt_debug.c b/src/btree/bt_debug.c index 4de94277364..af9f6a669f2 100644 --- a/src/btree/bt_debug.c +++ b/src/btree/bt_debug.c @@ -408,11 +408,13 @@ __debug_tree_shape_info(WT_PAGE *page) v = page->memory_footprint; if (v >= WT_GIGABYTE) - snprintf(buf, sizeof(buf), "(%" PRIu64 "G)", v / WT_GIGABYTE); + snprintf(buf, sizeof(buf), + "(%p %" PRIu64 "G)", page, v / WT_GIGABYTE); else if (v >= WT_MEGABYTE) - snprintf(buf, sizeof(buf), "(%" PRIu64 "M)", v / WT_MEGABYTE); + snprintf(buf, sizeof(buf), + "(%p %" PRIu64 "M)", page, v / WT_MEGABYTE); else - snprintf(buf, sizeof(buf), "(%" PRIu64 ")", v); + snprintf(buf, sizeof(buf), "(%p %" PRIu64 ")", page, v); return (buf); } @@ -429,16 +431,16 @@ __debug_tree_shape_worker(WT_DBG *ds, WT_PAGE *page, int level) session = ds->session; if (page->type == WT_PAGE_ROW_INT || page->type == WT_PAGE_COL_INT) { - __dmsg(ds, "%*s" "I" "%s\n", - level, " ", __debug_tree_shape_info(page)); + __dmsg(ds, "%*s" "I" "%d %s\n", + level * 3, " ", level, __debug_tree_shape_info(page)); WT_INTL_FOREACH_BEGIN(session, page, ref) { if (ref->state == WT_REF_MEM) __debug_tree_shape_worker( - ds, ref->page, level + 3); + ds, ref->page, level + 1); } WT_INTL_FOREACH_END; } else - __dmsg(ds, "%*s" "L" "%s\n", - level, " ", __debug_tree_shape_info(page)); + __dmsg(ds, "%*s" "L" " %s\n", + level * 3, " ", __debug_tree_shape_info(page)); } /* @@ -458,8 +460,7 @@ __wt_debug_tree_shape( if (page == NULL) page = S2BT(session)->root.page; - WT_WITH_PAGE_INDEX(session, - __debug_tree_shape_worker(ds, page, 0)); + WT_WITH_PAGE_INDEX(session, __debug_tree_shape_worker(ds, page, 1)); __dmsg_wrapup(ds); return (0); |