maple_tree: add format option to mt_dump()
Allow different formatting strings to be used when dumping the tree. Currently supports hex and decimal. Link: https://lkml.kernel.org/r/20230518145544.1722059-6-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: David Binderman <dcb314@hotmail.com> Cc: Peng Zhang <zhangpeng.00@bytedance.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Vernon Yang <vernon2gm@gmail.com> Cc: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
c3eb787e88
commit
89f499f35c
@@ -219,7 +219,7 @@ static noinline void check_rev_seq(struct maple_tree *mt, unsigned long max,
|
||||
#ifndef __KERNEL__
|
||||
if (verbose) {
|
||||
rcu_barrier();
|
||||
mt_dump(mt);
|
||||
mt_dump(mt, mt_dump_dec);
|
||||
pr_info(" %s test of 0-%lu %luK in %d active (%d total)\n",
|
||||
__func__, max, mt_get_alloc_size()/1024, mt_nr_allocated(),
|
||||
mt_nr_tallocated());
|
||||
@@ -248,7 +248,7 @@ static noinline void check_seq(struct maple_tree *mt, unsigned long max,
|
||||
#ifndef __KERNEL__
|
||||
if (verbose) {
|
||||
rcu_barrier();
|
||||
mt_dump(mt);
|
||||
mt_dump(mt, mt_dump_dec);
|
||||
pr_info(" seq test of 0-%lu %luK in %d active (%d total)\n",
|
||||
max, mt_get_alloc_size()/1024, mt_nr_allocated(),
|
||||
mt_nr_tallocated());
|
||||
@@ -893,7 +893,7 @@ static noinline void check_alloc_range(struct maple_tree *mt)
|
||||
#if DEBUG_ALLOC_RANGE
|
||||
pr_debug("\tInsert %lu-%lu\n", range[i] >> 12,
|
||||
(range[i + 1] >> 12) - 1);
|
||||
mt_dump(mt);
|
||||
mt_dump(mt, mt_dump_hex);
|
||||
#endif
|
||||
check_insert_range(mt, range[i] >> 12, (range[i + 1] >> 12) - 1,
|
||||
xa_mk_value(range[i] >> 12), 0);
|
||||
@@ -934,7 +934,7 @@ static noinline void check_alloc_range(struct maple_tree *mt)
|
||||
xa_mk_value(req_range[i] >> 12)); /* pointer */
|
||||
mt_validate(mt);
|
||||
#if DEBUG_ALLOC_RANGE
|
||||
mt_dump(mt);
|
||||
mt_dump(mt, mt_dump_hex);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1572,7 +1572,7 @@ static noinline void check_node_overwrite(struct maple_tree *mt)
|
||||
mtree_test_store_range(mt, i*100, i*100 + 50, xa_mk_value(i*100));
|
||||
|
||||
mtree_test_store_range(mt, 319951, 367950, NULL);
|
||||
/*mt_dump(mt); */
|
||||
/*mt_dump(mt, mt_dump_dec); */
|
||||
mt_validate(mt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user