[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [TOOLS] Added option to xentrace to discard records in the buffer
# HG changeset patch # User George Dunlap <gdunlap@xxxxxxxxxxxxx> # Date 1172574095 18000 # Node ID ffe7e8ef2c981767f92e30246e7add96a8dc5a8a # Parent c2e7bacf0919242623bbd0f4c20fec08c1735a07 [TOOLS] Added option to xentrace to discard records in the buffer before beginning the trace. Signed-off-by: George Dunlap <gdunlap@xxxxxxxxxxxxx> --- tools/xentrace/xentrace.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) diff -r c2e7bacf0919 -r ffe7e8ef2c98 tools/xentrace/xentrace.c --- a/tools/xentrace/xentrace.c Tue Feb 27 01:52:27 2007 +0000 +++ b/tools/xentrace/xentrace.c Tue Feb 27 06:01:35 2007 -0500 @@ -56,6 +56,7 @@ typedef struct settings_st { uint32_t evt_mask; uint32_t cpu_mask; unsigned long tbuf_size; + int discard:1; } settings_t; settings_t opts; @@ -306,6 +307,13 @@ int monitor_tbufs(FILE *logfile) /* build arrays of convenience ptrs */ meta = init_bufs_ptrs(tbufs_mapped, num, size); data = init_rec_ptrs(meta, num); + + if(opts.discard) { + for ( i = 0; (i < num) ; i++ ) + { + meta[i]->cons = meta[i]->prod; + } + } /* now, scan buffers for events */ while ( !interrupted ) @@ -413,6 +421,12 @@ error_t cmd_parser(int key, char *arg, s } break; + case 'D': /* Discard traces currently in the buffer before beginning */ + { + opts.discard=1; + } + break; + case ARGP_KEY_ARG: { if ( state->arg_num == 0 ) @@ -457,6 +471,11 @@ const struct argp_option cmd_opts[] = "Set trace buffer size in pages (default " xstr(DEFAULT_TBUF_SIZE) "). " "N.B. that the trace buffer cannot be resized. If it has " "already been set this boot cycle, this argument will be ignored." }, + + { .name = "discard-buffers", .key='D', .arg=NULL, + .flags=OPTION_ARG_OPTIONAL, + .doc = "Discard all records currently in the trace buffers before " + " beginning." }, {0} }; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |