ia64/xen-unstable

changeset 17119:644ddc6514b1

xentrace: Fix --discard-buffers option
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 26 14:38:39 2008 +0000 (2008-02-26)
parents 2749d15c7410
children 803c964e3ede
files tools/xentrace/xentrace.c
line diff
     1.1 --- a/tools/xentrace/xentrace.c	Tue Feb 26 14:37:44 2008 +0000
     1.2 +++ b/tools/xentrace/xentrace.c	Tue Feb 26 14:38:39 2008 +0000
     1.3 @@ -471,6 +471,8 @@ void usage(void)
     1.4  "                          N.B. that the trace buffer cannot be resized.\n" \
     1.5  "                          if it has already been set this boot cycle,\n" \
     1.6  "                          this argument will be ignored.\n" \
     1.7 +"  -D  --discard-buffers   Discard all records currently in the trace\n" \
     1.8 +"                          buffers before beginning.\n" \
     1.9  "  -?, --help              Show this message\n" \
    1.10  "  -V, --version           Print program version\n" \
    1.11  "\n" \
    1.12 @@ -539,6 +541,7 @@ void parse_args(int argc, char **argv)
    1.13          { "cpu-mask",       required_argument, 0, 'c' },
    1.14          { "evt-mask",       required_argument, 0, 'e' },
    1.15          { "trace-buf-size", required_argument, 0, 'S' },
    1.16 +        { "discard-buffers", no_argument,      0, 'D' },
    1.17          { "help",           no_argument,       0, '?' },
    1.18          { "version",        no_argument,       0, 'V' },
    1.19          { 0, 0, 0, 0 }
    1.20 @@ -570,6 +573,10 @@ void parse_args(int argc, char **argv)
    1.21              exit(EXIT_SUCCESS);
    1.22              break;
    1.23              
    1.24 +        case 'D': /* Discard traces currently in buffer */
    1.25 +            opts.discard = 1;
    1.26 +            break;
    1.27 + 
    1.28          default:
    1.29              usage();
    1.30          }