[PATCH] Switch hash option -h, update btrace for all new options
authorJens Axboe <axboe@suse.de>
Fri, 7 Oct 2005 12:05:18 +0000 (14:05 +0200)
committerJens Axboe <axboe@suse.de>
Fri, 7 Oct 2005 12:05:18 +0000 (14:05 +0200)
README
blkparse.c
btrace
doc/blktrace.tex

diff --git a/README b/README
index a503b371b67055a04991977dbea23af62c41da20..01837b4ac3885c54a2d679d5d51e2df1bb115e94 100644 (file)
--- a/README
+++ b/README
@@ -70,7 +70,7 @@ $ blkparse -i <input> [ -o <output> ] [ -b rb_batch ] [ -s ] [ -t ] [ -q ]
        -o Output file. If not given, output is stdout.
        -b stdin read batching.
        -s Show per-program io statistics.
-       -n Hash processes by name, not pid.
+       -h Hash processes by name, not pid.
        -t Track individual ios. Will tell you the time a request took to
           get queued, to get dispatched, and to get completed.
        -q Quiet. Don't display any stats at the end of the trace.
index 25662803354d286f68e6adcd64c2c3fb55ecf948..c30ac96e60310cb50e9dcbf4f2037795514bd958 100644 (file)
@@ -81,7 +81,7 @@ static struct per_process_info *ppi_hash_table[PPI_HASH_SIZE];
 static struct per_process_info *ppi_list;
 static int ppi_list_entries;
 
-#define S_OPTS "a:A:i:o:b:stqw:f:F:vVnD:"
+#define S_OPTS "a:A:i:o:b:stqw:f:F:vVhD:"
 static struct option l_opts[] = {
        {
                .name = "act-mask",
@@ -153,7 +153,7 @@ static struct option l_opts[] = {
                .name = "hash-by-name",
                .has_arg = no_argument,
                .flag = NULL,
-               .val = 'n'
+               .val = 'h'
        },
        {
                .name = "verbose",
@@ -1721,8 +1721,8 @@ static char usage_str[] = \
        "\t-q Quiet. Don't display any stats at the end of the trace\n" \
        "\t-w Only parse data between the given time interval in seconds.\n" \
        "\t   If 'start' isn't given, blkparse defaults the start time to 0\n" \
-       "\t -f Output format. Customize the output format. The format field\n" \
-       "\t    identifies can be found in the documentation\n" \
+       "\t-f Output format. Customize the output format. The format field\n" \
+       "\t   identifies can be found in the documentation\n" \
        "\t-F Format specification. Can be found in the documentation\n" \
        "\t-v More verbose for marginal errors\n" \
        "\t-V Print program version info\n\n";
@@ -1797,7 +1797,7 @@ int main(int argc, char *argv[])
                        if (add_format_spec(optarg) != 0)
                                return 1;
                        break;
-               case 'n':
+               case 'h':
                        ppi_hash_by_pid = 0;
                        break;
                case 'v':
diff --git a/btrace b/btrace
index d170bef45fc160f1e5a4c0d82098b5eb3ca91ccb..38ea1cee940838f59676901d7a5b55b328b22c03 100755 (executable)
--- a/btrace
+++ b/btrace
@@ -17,8 +17,11 @@ do
        case $c in
        a)      TRACEOPTS=$TRACEOPTS" -a "$OPTARG" ";;
        w)      TRACEOPTS=$TRACEOPTS" -w "$OPTARG" ";;
+       n)      TRACEOPTS=$TRACEOPTS" -n "$OPTARG" ";;
+       b)      TRACEOPTS=$TRACEOPTS" -b "$OPTARG" ";;
        s)      PARSEOPTS=$PARSEOPTS" -s";;
        t)      PARSEOPTS=$PARSEOPTS" -t";;
+       h)      PARSEOPTS=$PARSEOPTS" -h";;
        S)      SUMMARIZE="";;
        \?)     echo $USAGE 1>&2
                exit 2
index 78215b69bdc654b0522cc9cfc6cd737d10cd1d1e..df2051cf8679d088bc41f14628a5a41c143b5d7a 100644 (file)
@@ -481,7 +481,7 @@ Short              & Long                       & Description \\ \hline\hline
 
 -m                 & --missing                  & Print missing entries\\ \hline
 
--n                 & --hash-by-name             & Hash processes by name, not by PID\\ \hline
+-h                 & --hash-by-name             & Hash processes by name, not by PID\\ \hline
 
 -o \emph{file}     & --output=\emph{file}       & Output file \\ \hline