WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Added option to xentrace to set the trace

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Added option to xentrace to set the trace buffer size.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Aug 2006 17:30:13 +0000
Delivery-date: Mon, 21 Aug 2006 10:30:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User George Dunlap <dunlapg@xxxxxxxxx>
# Node ID f681ffc9b01a5ba97ccb81dbeb50343904e8498b
# Parent  6a8204e4619d5bd182364b768b1ec2c8a43e8d15
Added option to xentrace to set the trace buffer size.

Signed-off-by: George Dunlap <gdunlap@xxxxxxxxxxxxx>
---
 tools/xentrace/xentrace.c |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletion(-)

diff -r 6a8204e4619d -r f681ffc9b01a tools/xentrace/xentrace.c
--- a/tools/xentrace/xentrace.c Mon Aug 21 13:36:05 2006 +0100
+++ b/tools/xentrace/xentrace.c Mon Aug 21 12:05:11 2006 -0400
@@ -55,6 +55,7 @@ typedef struct settings_st {
     unsigned long new_data_thresh;
     uint32_t evt_mask;
     uint32_t cpu_mask;
+    unsigned long tbuf_size;
 } settings_t;
 
 settings_t opts;
@@ -111,7 +112,10 @@ static void get_tbufs(unsigned long *mfn
         exit(EXIT_FAILURE);
     }
 
-    ret = xc_tbuf_enable(xc_handle, DEFAULT_TBUF_SIZE, mfn, size);
+    if(!opts.tbuf_size)
+      opts.tbuf_size = DEFAULT_TBUF_SIZE;
+
+    ret = xc_tbuf_enable(xc_handle, opts.tbuf_size, mfn, size);
 
     if ( ret != 0 )
     {
@@ -400,6 +404,15 @@ error_t cmd_parser(int key, char *arg, s
     }
     break;
     
+    case 'S': /* set tbuf size (given in pages) */
+    {
+        char *inval;
+        setup->tbuf_size = strtol(arg, &inval, 0);
+        if ( inval == arg )
+            argp_usage(state);
+    }
+    break;
+
     case ARGP_KEY_ARG:
     {
         if ( state->arg_num == 0 )
@@ -438,6 +451,12 @@ const struct argp_option cmd_opts[] =
     { .name = "evt-mask", .key='e', .arg="e",
       .doc = 
       "set evt-mask " },
+
+    { .name = "trace-buf-size", .key='S', .arg="N",
+      .doc =
+      "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." },
 
     {0}
 };

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Added option to xentrace to set the trace buffer size., Xen patchbot-unstable <=