Re: [PATCH v3 5/6] Update the maple tree help info for tree cmd

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

 



On Wed, Dec 14, 2022 at 4:28 PM lijiang <lijiang@xxxxxxxxxx> wrote:
>
> On Tue, Dec 6, 2022 at 4:40 PM <crash-utility-request@xxxxxxxxxx> wrote:
> > Date: Tue,  6 Dec 2022 16:40:21 +0800
> > From: Tao Liu <ltao@xxxxxxxxxx>
> > To: crash-utility@xxxxxxxxxx
> > Subject:  [PATCH v3 5/6] Update the maple tree help
> >         info for tree cmd
> > Message-ID: <20221206084022.58693-6-ltao@xxxxxxxxxx>
> > Content-Type: text/plain; charset="US-ASCII"; x-default=true
> >
> > Signed-off-by: Tao Liu <ltao@xxxxxxxxxx>
> > ---
> >  help.c | 46 ++++++++++++++++++++++++----------------------
> >  1 file changed, 24 insertions(+), 22 deletions(-)
> >
> > diff --git a/help.c b/help.c
> > index 99214c1..f764d08 100644
> > --- a/help.c
> > +++ b/help.c
> > @@ -6306,19 +6306,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 ",
> > @@ -6347,25 +6348,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 ",
>
> Could you please also add a simple example for the maple tree option
> to the above EXAMPLES section? That looks more helpful.
>
> BTW: I noticed that you had put several examples to patch[2] log.
>
Good suggestion! I have added the patch[2] examples to the EXAMPLES
section. It is more convenient for people to find it from the help
message instead of the commit log.

Thanks,
Tao Liu


> Thanks.
> Lianbo
>
> > --
> > 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