From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: [PATCH 1/4] xentrace: Fix --discard-buffers option Date: Mon, 25 Feb 2008 16:57:21 +0000 Message-ID: <47C2F371.60304@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000706070703020209050805" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------000706070703020209050805 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit --------------000706070703020209050805 Content-Type: text/x-patch; name="01.xentrace.fix-discard.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01.xentrace.fix-discard.patch" xentrace: Fix --discard-buffers option Signed-off-by: George Dunlap diff -r cb3e47897b85 tools/xentrace/xentrace.c --- a/tools/xentrace/xentrace.c Mon Feb 25 11:24:06 2008 +0000 +++ b/tools/xentrace/xentrace.c Mon Feb 25 15:46:26 2008 +0000 @@ -471,6 +471,8 @@ void usage(void) " N.B. that the trace buffer cannot be resized.\n" \ " if it has already been set this boot cycle,\n" \ " this argument will be ignored.\n" \ +" -D --discard-buffers Discard all records currently in the trace\n" \ +" buffers before beginning.\n" \ " -?, --help Show this message\n" \ " -V, --version Print program version\n" \ "\n" \ @@ -539,6 +541,7 @@ void parse_args(int argc, char **argv) { "cpu-mask", required_argument, 0, 'c' }, { "evt-mask", required_argument, 0, 'e' }, { "trace-buf-size", required_argument, 0, 'S' }, + { "discard-buffers", no_argument, 0, 'D' }, { "help", no_argument, 0, '?' }, { "version", no_argument, 0, 'V' }, { 0, 0, 0, 0 } @@ -570,6 +573,10 @@ void parse_args(int argc, char **argv) exit(EXIT_SUCCESS); break; + case 'D': /* Discard traces currently in buffer */ + opts.discard = 1; + break; + default: usage(); } --------------000706070703020209050805 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------000706070703020209050805--