tools/vm/slabinfo: Clean up slabinfo -h
cover tools/vm/slabinfo: Clean up slabinfo -h
Hi Andrew,
Here is a simple patchset cleaning up the help output message for slabinfo.
All patches include Acked-by tag from Christopher (patches were viewed and acked off list).
thanks,
Tobin
Tobin C. Harding (4):
tools/vm/slabinfo: Update options in usage message tools/vm/slabinfo: Put options in alphabetic order tools/vm/slabinfo: Align usage output columns tools/vm/slabinfo: Clean up usage menu debug items
tools/vm/slabinfo.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/4 tools/vm/slabinfo: Update options in usage message
Currently usage message list only a subset of the available options. should list them all.
Update options in usage massage to include all available options.
--- tools/vm/slabinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/vm/slabinfo.c +1 -1
@@ -110,7 +110,7 @@ static void fatal(const char *x, ...)static void usage (void ) {printf ("slabinfo 4/15/2011. (c) 2007 sgi/(c) 2011 Linux Foundation.\n\n" -"slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" +"slabinfo [-aADefhilnosrStTvz1LXBU] [N=K] [-dafzput] [slab-regexp]\n" "-a|--aliases Show aliases\n" "-A|--activity Most active slabs first\n" "-d<options>|--debug=<options> Set/Clear Debug options\n"
Signature · 1 line
2.20.1
PATCH 2/4 tools/vm/slabinfo: Put options in alphabetic order
In reply to Tobin C. HardingPrimarily the usage message lists options in alphabetic order however there are a bunch of the options that are not in alphabetic order.
Put options in alphabetic order.
--- tools/vm/slabinfo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
tools/vm/slabinfo.c +6 -5
@@ -113,6 +113,7 @@ static void usage(void)"slabinfo [-aADefhilnosrStTvz1LXBU] [N=K] [-dafzput] [slab-regexp]\n" "-a|--aliases Show aliases\n" "-A|--activity Most active slabs first\n" +"-B|--Bytes Show size in bytes\n" "-d<options>|--debug=<options> Set/Clear Debug options\n" "-D|--display-active Switch line format to activity\n" "-e|--empty Show empty slabs\n"
@@ -120,21 +121,21 @@ static void usage(void)"-h|--help Show usage information\n" "-i|--inverted Inverted list\n" "-l|--slabs Show slabs\n" +"-L|--Loss Sort by loss\n" "-n|--numa Show NUMA information\n" +"-N|--lines=K Show the first K slabs\n" "-o|--ops Show kmem_cache_ops\n" -"-s|--shrink Shrink slabs\n" "-r|--report Detailed report on single slabs\n" +"-s|--shrink Shrink slabs\n" "-S|--Size Sort by size\n" "-t|--tracking Show alloc/free information\n" "-T|--Totals Show summary information\n" +"-U|--Unreclaim Show unreclaimable slabs only\n" "-v|--validate Validate slabs\n" "-z|--zero Include empty slabs\n" "-1|--1ref Single reference\n" -"-N|--lines=K Show the first K slabs\n" -"-L|--Loss Sort by loss\n" "-X|--Xtotals Show extended summary information\n" -"-B|--Bytes Show size in bytes\n" -"-U|--Unreclaim Show unreclaimable slabs only\n" +"\nValid debug options (FZPUT may be combined)\n" "a / A Switch on all debug options (=FZUP)\n" "- Switch off all debug options\n"
Signature · 1 line
2.20.1
PATCH 3/4 tools/vm/slabinfo: Align usage output columns
In reply to Tobin C. HardingUsage message uses spaces not tabspaces, a few tabspaces have snuck in making the columns not align correctly when output.
Align usage output columns using spaces instead of tabspaces.
--- tools/vm/slabinfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/vm/slabinfo.c +3 -3
@@ -124,13 +124,13 @@ static void usage(void)"-L|--Loss Sort by loss\n" "-n|--numa Show NUMA information\n" "-N|--lines=K Show the first K slabs\n" -"-o|--ops Show kmem_cache_ops\n" -"-r|--report Detailed report on single slabs\n" +"-o|--ops Show kmem_cache_ops\n" +"-r|--report Detailed report on single slabs\n" "-s|--shrink Shrink slabs\n" "-S|--Size Sort by size\n" "-t|--tracking Show alloc/free information\n" "-T|--Totals Show summary information\n" -"-U|--Unreclaim Show unreclaimable slabs only\n" +"-U|--Unreclaim Show unreclaimable slabs only\n" "-v|--validate Validate slabs\n" "-z|--zero Include empty slabs\n" "-1|--1ref Single reference\n"
Signature · 1 line
2.20.1
PATCH 4/4 tools/vm/slabinfo: Clean up usage menu debug items
In reply to Tobin C. HardingAttempt to make the usage comment for debug options a little cleaner.
--- tools/vm/slabinfo.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
tools/vm/slabinfo.c +11 -9
@@ -114,7 +114,6 @@ static void usage(void)"-a|--aliases Show aliases\n" "-A|--activity Most active slabs first\n" "-B|--Bytes Show size in bytes\n" -"-d<options>|--debug=<options> Set/Clear Debug options\n" "-D|--display-active Switch line format to activity\n" "-e|--empty Show empty slabs\n" "-f|--first-alias Show first alias\n"
@@ -136,14 +135,17 @@ static void usage(void)"-1|--1ref Single reference\n" "-X|--Xtotals Show extended summary information\n" -"\nValid debug options (FZPUT may be combined)\n" -"a / A Switch on all debug options (=FZUP)\n" -"- Switch off all debug options\n" -"f / F Sanity Checks (SLAB_CONSISTENCY_CHECKS)\n" -"z / Z Redzoning\n" -"p / P Poisoning\n" -"u / U Tracking\n" -"t / T Tracing\n" +"\n" +"-d | --debug Switch off all debug options\n" +"-da | --debug=a Switch on all debug options (--debug=FZPU)\n" + +"\n" +"-d[afzput] | --debug=[afzput]\n" +" f | F Sanity Checks (SLAB_CONSISTENCY_CHECKS)\n" +" z | Z Redzoning\n" +" p | P Poisoning\n" +" u | U Tracking\n" +" t | T Tracing\n" ); }
Signature · 1 line
2.20.1