[PATCH v5 5/6] Update the maple tree help info for tree cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tao Liu <ltao@xxxxxxxxxx>
---
 help.c | 86 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 64 insertions(+), 22 deletions(-)

diff --git a/help.c b/help.c
index 367500f..b23a65f 100644
--- a/help.c
+++ b/help.c
@@ -6307,19 +6307,20 @@ NULL
 
 char *help_tree[] = {
 "tree",
-"display radix tree, XArray or red-black tree",
-"[-t [radix|xarray|rbtree]] [-r offset] [-[s|S] struct[.member[,member]]]\n       -[x|d] [-o offset] [-l] [-p] [-N] start",
-"  This command dumps the contents of a radix tree, an XAarray, or a red-black",
-"  tree.  The arguments are as follows:\n",
+"display radix tree, XArray, red-black tree or maple tree",
+"[-t [radix|xarray|rbtree|maple]] [-r offset] [-[s|S] struct[.member[,member]]]\n"
+"       -[x|d] [-o offset] [-l] [-p] [-v] [-N] start",
+"  This command dumps the contents of a radix tree, an XAarray, a red-black",
+"  tree, or a maple tree.  The arguments are as follows:\n",
 "    -t type  The type of tree to dump; the type string can be one of ",
-"             \"radix\", \"rbtree\", or \"xarray\", or alternatively, \"ra\",",
-"             \"rb\" or \"x\" are acceptable.  If not specified, rbtree is the",
-"             default type.",
+"             \"radix\", \"rbtree\", \"xarray\", or \"maple\", or alternatively,",
+"             \"ra\", \"rb\", \"x\" or \"m\" are acceptable. If not specified,",
+"             rbtree is the default type.",
 "  -r offset  If the \"start\" argument is the address of a data structure that",
-"             contains an radix_tree_root, xarray or rb_root structure, then this", 
-"             is the offset to that structure member.  If the offset is non-zero,",
-"             then this option is required.  The offset may be entered in either",
-"             of two manners:",
+"             contains an radix_tree_root, maple_tree, xarray or rb_root",
+"             structure, then this is the offset to that structure member. If",
+"             the offset is non-zero, then this option is required.  The offset",
+"             may be entered in either of two manners:",
 "               1. In \"structure.member\" format.",
 "               2. A number of bytes.",
 "  -o offset  For red-black trees only, the offset of the rb_node within its ",
@@ -6348,25 +6349,26 @@ char *help_tree[] = {
 "         -p  Display the node's position information, showing the relationship",
 "             between it and the root.  For red-black trees, a position that",
 "             indicates \"root/l/r\" means that the node is the right child",
-"             of the left child of the root node.  For radix trees and xarrays,",
-"             the index, the height, and the slot index values are shown with",
-"             respect to the root.",
+"             of the left child of the root node.  For radix trees, xarrays and",
+"             maple trees, the index, the height, and the slot index values are",
+"             shown with respect to the root.",
 "         -x  Override default output format with hexadecimal format.",
 "         -d  Override default output format with decimal format.",
+"         -v  For maple trees only, showing the contents of each maple tree node.",
 " ",
 "  The meaning of the \"start\" argument, which can be expressed either in",
 "  hexadecimal format or symbolically, depends upon whether the -N option",
 "  is prepended:",
 " ",
-"      start  The address of a radix_tree_root, xarray or rb_root structure, or",
-"             the address of a structure containing the radix_tree_root, xarray",
-"             or rb_root structure; if the latter, then the \"-r offset\" option",
-"             must be used if the member offset of the root structure is ",
-"             non-zero.",
+"      start  The address of a radix_tree_root, maple_tree, xarray or rb_root",
+"             structure, or the address of a structure containing the",
+"             radix_tree_root, maple_tree, xarray or rb_root structure; if the",
+"             latter, then the \"-r offset\" option must be used if the member",
+"             offset of the root structure is non-zero.",
 "               ",
-"   -N start  The address of a radix_tree_node, xa_node or rb_node structure,",
-"             bypassing the radix_tree_root, xarray, or rb_root that points",
-"             to it.",
+"   -N start  The address of a radix_tree_node, maple_node, xa_node or rb_node",
+"             structure, bypassing the radix_tree_root, maple_tree, xarray, or",
+"             rb_root that points to it.",
 "",
 "\nEXAMPLES",
 "  The vmap_area_root is a standalone rb_root structure.  Display the ",
@@ -6703,6 +6705,46 @@ char *help_tree[] = {
 "      _refcount = {",
 "        counter = 0x1",
 "      }",
+"",
+"  The -v option is introduced specifically for dumping the complete content of",
+"  maple tree:",
+"",
+"    %s> tree -t maple 0xffff9034c006aec0 -v",
+"",
+"    maple_tree(ffff9034c006aec0) flags 309, height 2 root 0xffff9034de70041e",
+"",
+"    0-18446744073709551615: node 0xffff9034de700400 depth 0 type 3 parent ...",
+"      0-140112331583487: node 0xffff9034c01e8800 depth 1 type 1 parent ...",
+"        0-94643156942847: 0x0",
+"        94643156942848-94643158024191: 0xffff9035131754c0",
+"        94643158024192-94643160117247: 0x0",
+"        ...",
+"",
+"  The old tree args can work as well for maple tree:",
+"",
+"    %s> tree -t maple -r mm_struct.mm_mt 0xffff9034c006aec0 -p",
+"    ffff9035131754c0",
+"      index: 1  position: root/0/1",
+"    ffff9035131751c8",
+"      index: 2  position: root/0/3",
+"    ffff9035131757b8",
+"      index: 3  position: root/0/4",
+"    ...",
+"",
+"    %s> tree -t maple 0xffff9034c006aec0 -p -x -s vm_area_struct.vm_start,vm_end",
+"    ffff9035131754c0",
+"      index: 1  position: root/0/1",
+"      vm_start = 0x5613d3c00000,",
+"      vm_end = 0x5613d3d08000,",
+"    ffff9035131751c8",
+"      index: 2  position: root/0/3",
+"      vm_start = 0x5613d3f07000,",
+"      vm_end = 0x5613d3f0b000,",
+"    ffff9035131757b8",
+"      index: 3  position: root/0/4",
+"      vm_start = 0x5613d3f0b000,",
+"      vm_end = 0x5613d3f14000,",
+"    ....",
 NULL
 };
 
-- 
2.33.1

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux