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-devel

[Xen-devel] PATCH: Rename setsize and setmask

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] PATCH: Rename setsize and setmask
From: Rob Gardner <rob.gardner@xxxxxx>
Date: Tue, 15 Aug 2006 15:31:35 -0600
Delivery-date: Tue, 15 Aug 2006 14:32:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)
As requested, a simple renaming to make it obvious that setmask and setsize are xen related.

Signed-off-by:  Rob Gardner <rob.gardner@xxxxxx>

# HG changeset patch
# User rob.gardner@xxxxxx
# Node ID e9d5879c89f07ef692cf55037556cb8739acc582
# Parent  6dcd85ea232e0de5445f325abd0829a0ed6d56a1

Renamed setmask and setsize to reflect their association with xen

diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xenmon/Makefile
--- a/tools/xenmon/Makefile    Tue Aug 15 12:54:09 2006
+++ b/tools/xenmon/Makefile    Tue Aug 15 21:23:46 2006
@@ -25,7 +25,7 @@
CFLAGS  += -I $(XEN_LIBXC)
LDFLAGS += -L $(XEN_LIBXC)

-BIN = setmask xenbaked
+BIN = xentrace_setmask xenbaked
SCRIPTS = xenmon.py

.PHONY: all
@@ -35,10 +35,10 @@
build: $(BIN)

.PHONY: install
-install: xenbaked setmask
+install: xenbaked xentrace_setmask
    [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
    $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
-    $(INSTALL_PROG) setmask  $(DESTDIR)$(sbindir)/setmask
+    $(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(sbindir)/xentrace_setmask
    $(INSTALL_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon.py

.PHONY: clean
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xentrace/Makefile
--- a/tools/xentrace/Makefile    Tue Aug 15 12:54:09 2006
+++ b/tools/xentrace/Makefile    Tue Aug 15 21:23:46 2006
@@ -14,7 +14,7 @@
HDRS     = $(wildcard *.h)
OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))

-BIN      = xentrace setsize
+BIN      = xentrace xentrace_setsize
LIBBIN   =
SCRIPTS  = xentrace_format
MAN1     = $(wildcard *.1)
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xenmon/xentrace_setmask.c
--- /dev/null    Tue Aug 15 12:54:09 2006
+++ b/tools/xenmon/xentrace_setmask.c    Tue Aug 15 21:23:46 2006
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * tools/xenmon/setmask.c
+ *
+ * Simple utility for getting/setting the event mask
+ *
+ * Copyright (C) 2005 by Hewlett-Packard, Palo Alto and Fort Collins
+ *
+ * Authors: Lucy Cherkasova, lucy.cherkasova.hp.com
+ *          Rob Gardner, rob.gardner@xxxxxx
+ *          Diwaker Gupta, diwaker.gupta@xxxxxx
+ * Date:   August, 2005
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; under version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <getopt.h>
+#include <xenctrl.h>
+#include <xen/xen.h>
+typedef struct { int counter; } atomic_t;
+#include <xen/trace.h>
+
+#define XENMON (TRC_SCHED_DOM_ADD | TRC_SCHED_DOM_REM | TRC_SCHED_SWITCH_INFPREV | TRC_SCHED_SWITCH_INFNEXT | TRC_SCHED_BLOCK | TRC_SCHED_SLEEP | TRC_SCHED_WAKE | TRC_MEM_PAGE_GRANT_TRANSFER)
+
+int main(int argc, char * argv[])
+{
+
+    dom0_op_t op;
+    int ret;
+
+    int xc_handle = xc_interface_open();
+    op.cmd = DOM0_TBUFCONTROL;
+    op.interface_version = DOM0_INTERFACE_VERSION;
+    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
+    ret = xc_dom0_op(xc_handle, &op);
+    if ( ret != 0 )
+    {
+        perror("Failure to get event mask from Xen");
+        exit(1);
+    }
+    else
+    {
+        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+    }
+
+    op.cmd = DOM0_TBUFCONTROL;
+    op.interface_version = DOM0_INTERFACE_VERSION;
+    op.u.tbufcontrol.op  = DOM0_TBUF_SET_EVT_MASK;
+    op.u.tbufcontrol.evt_mask = XENMON;
+
+    ret = xc_dom0_op(xc_handle, &op);
+    printf("Setting mask to 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+    if ( ret != 0 )
+    {
+        perror("Failure to get scheduler ID from Xen");
+        exit(1);
+    }
+
+    op.cmd = DOM0_TBUFCONTROL;
+    op.interface_version = DOM0_INTERFACE_VERSION;
+    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
+    ret = xc_dom0_op(xc_handle, &op);
+    if ( ret != 0 )
+    {
+        perror("Failure to get event mask from Xen");
+        exit(1);
+    }
+    else
+    {
+        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+    }
+    xc_interface_close(xc_handle);
+    return 0;
+}
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xentrace/xentrace_setsize.c
--- /dev/null    Tue Aug 15 12:54:09 2006
+++ b/tools/xentrace/xentrace_setsize.c    Tue Aug 15 21:23:46 2006
@@ -0,0 +1,41 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <xenctrl.h>
+
+int main(int argc, char * argv[])
+{
+    unsigned long size;
+    int xc_handle = xc_interface_open();
+ + if ( xc_tbuf_get_size(xc_handle, &size) != 0 )
+    {
+        perror("Failure to get tbuf info from Xen. Guess size is 0");
+        printf("This may mean that tracing is not enabled in xen.\n");
+    }
+    else
+    {
+        printf("Current tbuf size: 0x%lx\n", size);
+    }
+
+    if (argc < 2)
+        exit(0);
+
+    size = atol(argv[1]);
+
+    if ( xc_tbuf_set_size(xc_handle, size) != 0 )
+    {
+        perror("set_size Hypercall failure");
+        exit(1);
+    }
+    printf("set_size succeeded.\n");
+ + if (xc_tbuf_get_size(xc_handle, &size) != 0)
+        perror("Failure to get tbuf info from Xen."
+               " Tracing must be enabled first");
+    else
+        printf("New tbuf size: 0x%lx\n", size);
+ + xc_interface_close(xc_handle);
+    return 0;
+}
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xenmon/setmask.c
--- a/tools/xenmon/setmask.c    Tue Aug 15 12:54:09 2006
+++ /dev/null    Tue Aug 15 21:23:46 2006
@@ -1,90 +0,0 @@
-/******************************************************************************
- * tools/xenmon/setmask.c
- *
- * Simple utility for getting/setting the event mask
- *
- * Copyright (C) 2005 by Hewlett-Packard, Palo Alto and Fort Collins
- *
- * Authors: Lucy Cherkasova, lucy.cherkasova.hp.com
- *          Rob Gardner, rob.gardner@xxxxxx
- *          Diwaker Gupta, diwaker.gupta@xxxxxx
- * Date:   August, 2005
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; under version 2 of the License.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <getopt.h>
-#include <xenctrl.h>
-#include <xen/xen.h>
-typedef struct { int counter; } atomic_t;
-#include <xen/trace.h>
-
-#define XENMON (TRC_SCHED_DOM_ADD | TRC_SCHED_DOM_REM | TRC_SCHED_SWITCH_INFPREV | TRC_SCHED_SWITCH_INFNEXT | TRC_SCHED_BLOCK | TRC_SCHED_SLEEP | TRC_SCHED_WAKE | TRC_MEM_PAGE_GRANT_TRANSFER)
-
-int main(int argc, char * argv[])
-{
-
-    dom0_op_t op;
-    int ret;
-
-    int xc_handle = xc_interface_open();
-    op.cmd = DOM0_TBUFCONTROL;
-    op.interface_version = DOM0_INTERFACE_VERSION;
-    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
-    ret = xc_dom0_op(xc_handle, &op);
-    if ( ret != 0 )
-    {
-        perror("Failure to get event mask from Xen");
-        exit(1);
-    }
-    else
-    {
-        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
-    }
-
-    op.cmd = DOM0_TBUFCONTROL;
-    op.interface_version = DOM0_INTERFACE_VERSION;
-    op.u.tbufcontrol.op  = DOM0_TBUF_SET_EVT_MASK;
-    op.u.tbufcontrol.evt_mask = XENMON;
-
-    ret = xc_dom0_op(xc_handle, &op);
-    printf("Setting mask to 0x%.8x\n", op.u.tbufcontrol.evt_mask);
-    if ( ret != 0 )
-    {
-        perror("Failure to get scheduler ID from Xen");
-        exit(1);
-    }
-
-    op.cmd = DOM0_TBUFCONTROL;
-    op.interface_version = DOM0_INTERFACE_VERSION;
-    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
-    ret = xc_dom0_op(xc_handle, &op);
-    if ( ret != 0 )
-    {
-        perror("Failure to get event mask from Xen");
-        exit(1);
-    }
-    else
-    {
-        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
-    }
-    xc_interface_close(xc_handle);
-    return 0;
-}
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xentrace/setsize.c
--- a/tools/xentrace/setsize.c    Tue Aug 15 12:54:09 2006
+++ /dev/null    Tue Aug 15 21:23:46 2006
@@ -1,41 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <xenctrl.h>
-
-int main(int argc, char * argv[])
-{
-    unsigned long size;
-    int xc_handle = xc_interface_open();
- - if ( xc_tbuf_get_size(xc_handle, &size) != 0 )
-    {
-        perror("Failure to get tbuf info from Xen. Guess size is 0");
-        printf("This may mean that tracing is not enabled in xen.\n");
-    }
-    else
-    {
-        printf("Current tbuf size: 0x%lx\n", size);
-    }
-
-    if (argc < 2)
-        exit(0);
-
-    size = atol(argv[1]);
-
-    if ( xc_tbuf_set_size(xc_handle, size) != 0 )
-    {
-        perror("set_size Hypercall failure");
-        exit(1);
-    }
-    printf("set_size succeeded.\n");
- - if (xc_tbuf_get_size(xc_handle, &size) != 0)
-        perror("Failure to get tbuf info from Xen."
-               " Tracing must be enabled first");
-    else
-        printf("New tbuf size: 0x%lx\n", size);
- - xc_interface_close(xc_handle);
-    return 0;
-}

# HG changeset patch
# User rob.gardner@xxxxxx
# Node ID e9d5879c89f07ef692cf55037556cb8739acc582
# Parent  6dcd85ea232e0de5445f325abd0829a0ed6d56a1

Renamed setmask and setsize to reflect their association with xen

diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xenmon/Makefile
--- a/tools/xenmon/Makefile     Tue Aug 15 12:54:09 2006
+++ b/tools/xenmon/Makefile     Tue Aug 15 21:23:46 2006
@@ -25,7 +25,7 @@
 CFLAGS  += -I $(XEN_LIBXC)
 LDFLAGS += -L $(XEN_LIBXC)
 
-BIN = setmask xenbaked
+BIN = xentrace_setmask xenbaked
 SCRIPTS = xenmon.py
 
 .PHONY: all
@@ -35,10 +35,10 @@
 build: $(BIN)
 
 .PHONY: install
-install: xenbaked setmask
+install: xenbaked xentrace_setmask
        [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
        $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
-       $(INSTALL_PROG) setmask  $(DESTDIR)$(sbindir)/setmask
+       $(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(sbindir)/xentrace_setmask
        $(INSTALL_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon.py
 
 .PHONY: clean
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xentrace/Makefile
--- a/tools/xentrace/Makefile   Tue Aug 15 12:54:09 2006
+++ b/tools/xentrace/Makefile   Tue Aug 15 21:23:46 2006
@@ -14,7 +14,7 @@
 HDRS     = $(wildcard *.h)
 OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
 
-BIN      = xentrace setsize
+BIN      = xentrace xentrace_setsize
 LIBBIN   = 
 SCRIPTS  = xentrace_format
 MAN1     = $(wildcard *.1)
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xenmon/xentrace_setmask.c
--- /dev/null   Tue Aug 15 12:54:09 2006
+++ b/tools/xenmon/xentrace_setmask.c   Tue Aug 15 21:23:46 2006
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * tools/xenmon/setmask.c
+ * 
+ * Simple utility for getting/setting the event mask
+ *
+ * Copyright (C) 2005 by Hewlett-Packard, Palo Alto and Fort Collins
+ *
+ * Authors: Lucy Cherkasova, lucy.cherkasova.hp.com
+ *          Rob Gardner, rob.gardner@xxxxxx
+ *          Diwaker Gupta, diwaker.gupta@xxxxxx
+ * Date:   August, 2005
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; under version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <getopt.h>
+#include <xenctrl.h>
+#include <xen/xen.h>
+typedef struct { int counter; } atomic_t;
+#include <xen/trace.h>
+
+#define XENMON (TRC_SCHED_DOM_ADD | TRC_SCHED_DOM_REM | 
TRC_SCHED_SWITCH_INFPREV | TRC_SCHED_SWITCH_INFNEXT | TRC_SCHED_BLOCK | 
TRC_SCHED_SLEEP | TRC_SCHED_WAKE | TRC_MEM_PAGE_GRANT_TRANSFER)
+
+int main(int argc, char * argv[])
+{
+
+    dom0_op_t op; 
+    int ret;
+
+    int xc_handle = xc_interface_open();
+    op.cmd = DOM0_TBUFCONTROL;
+    op.interface_version = DOM0_INTERFACE_VERSION;
+    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
+    ret = xc_dom0_op(xc_handle, &op);
+    if ( ret != 0 )
+    {
+        perror("Failure to get event mask from Xen");
+        exit(1);
+    }
+    else
+    {
+        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+    }
+
+    op.cmd = DOM0_TBUFCONTROL;
+    op.interface_version = DOM0_INTERFACE_VERSION;
+    op.u.tbufcontrol.op  = DOM0_TBUF_SET_EVT_MASK;
+    op.u.tbufcontrol.evt_mask = XENMON;
+
+    ret = xc_dom0_op(xc_handle, &op);
+    printf("Setting mask to 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+    if ( ret != 0 )
+    {
+        perror("Failure to get scheduler ID from Xen");
+        exit(1);
+    }
+
+    op.cmd = DOM0_TBUFCONTROL;
+    op.interface_version = DOM0_INTERFACE_VERSION;
+    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
+    ret = xc_dom0_op(xc_handle, &op);
+    if ( ret != 0 )
+    {
+        perror("Failure to get event mask from Xen");
+        exit(1);
+    }
+    else
+    {
+        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
+    }
+    xc_interface_close(xc_handle);
+    return 0;
+}
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xentrace/xentrace_setsize.c
--- /dev/null   Tue Aug 15 12:54:09 2006
+++ b/tools/xentrace/xentrace_setsize.c Tue Aug 15 21:23:46 2006
@@ -0,0 +1,41 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <xenctrl.h>
+
+int main(int argc, char * argv[])
+{
+    unsigned long size;
+    int xc_handle = xc_interface_open();
+  
+    if ( xc_tbuf_get_size(xc_handle, &size) != 0 )
+    {
+        perror("Failure to get tbuf info from Xen. Guess size is 0");
+        printf("This may mean that tracing is not enabled in xen.\n");
+    }
+    else
+    {
+        printf("Current tbuf size: 0x%lx\n", size);
+    }
+
+    if (argc < 2)
+        exit(0);
+
+    size = atol(argv[1]);
+
+    if ( xc_tbuf_set_size(xc_handle, size) != 0 )
+    {
+        perror("set_size Hypercall failure");
+        exit(1);
+    }
+    printf("set_size succeeded.\n");
+  
+    if (xc_tbuf_get_size(xc_handle, &size) != 0)
+        perror("Failure to get tbuf info from Xen."
+               " Tracing must be enabled first");
+    else
+        printf("New tbuf size: 0x%lx\n", size);
+  
+    xc_interface_close(xc_handle);
+    return 0;
+}
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xenmon/setmask.c
--- a/tools/xenmon/setmask.c    Tue Aug 15 12:54:09 2006
+++ /dev/null   Tue Aug 15 21:23:46 2006
@@ -1,90 +0,0 @@
-/******************************************************************************
- * tools/xenmon/setmask.c
- * 
- * Simple utility for getting/setting the event mask
- *
- * Copyright (C) 2005 by Hewlett-Packard, Palo Alto and Fort Collins
- *
- * Authors: Lucy Cherkasova, lucy.cherkasova.hp.com
- *          Rob Gardner, rob.gardner@xxxxxx
- *          Diwaker Gupta, diwaker.gupta@xxxxxx
- * Date:   August, 2005
- * 
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; under version 2 of the License.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <getopt.h>
-#include <xenctrl.h>
-#include <xen/xen.h>
-typedef struct { int counter; } atomic_t;
-#include <xen/trace.h>
-
-#define XENMON (TRC_SCHED_DOM_ADD | TRC_SCHED_DOM_REM | 
TRC_SCHED_SWITCH_INFPREV | TRC_SCHED_SWITCH_INFNEXT | TRC_SCHED_BLOCK | 
TRC_SCHED_SLEEP | TRC_SCHED_WAKE | TRC_MEM_PAGE_GRANT_TRANSFER)
-
-int main(int argc, char * argv[])
-{
-
-    dom0_op_t op; 
-    int ret;
-
-    int xc_handle = xc_interface_open();
-    op.cmd = DOM0_TBUFCONTROL;
-    op.interface_version = DOM0_INTERFACE_VERSION;
-    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
-    ret = xc_dom0_op(xc_handle, &op);
-    if ( ret != 0 )
-    {
-        perror("Failure to get event mask from Xen");
-        exit(1);
-    }
-    else
-    {
-        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
-    }
-
-    op.cmd = DOM0_TBUFCONTROL;
-    op.interface_version = DOM0_INTERFACE_VERSION;
-    op.u.tbufcontrol.op  = DOM0_TBUF_SET_EVT_MASK;
-    op.u.tbufcontrol.evt_mask = XENMON;
-
-    ret = xc_dom0_op(xc_handle, &op);
-    printf("Setting mask to 0x%.8x\n", op.u.tbufcontrol.evt_mask);
-    if ( ret != 0 )
-    {
-        perror("Failure to get scheduler ID from Xen");
-        exit(1);
-    }
-
-    op.cmd = DOM0_TBUFCONTROL;
-    op.interface_version = DOM0_INTERFACE_VERSION;
-    op.u.tbufcontrol.op  = DOM0_TBUF_GET_INFO;
-    ret = xc_dom0_op(xc_handle, &op);
-    if ( ret != 0 )
-    {
-        perror("Failure to get event mask from Xen");
-        exit(1);
-    }
-    else
-    {
-        printf("Current event mask: 0x%.8x\n", op.u.tbufcontrol.evt_mask);
-    }
-    xc_interface_close(xc_handle);
-    return 0;
-}
diff -r 6dcd85ea232e -r e9d5879c89f0 tools/xentrace/setsize.c
--- a/tools/xentrace/setsize.c  Tue Aug 15 12:54:09 2006
+++ /dev/null   Tue Aug 15 21:23:46 2006
@@ -1,41 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <xenctrl.h>
-
-int main(int argc, char * argv[])
-{
-    unsigned long size;
-    int xc_handle = xc_interface_open();
-  
-    if ( xc_tbuf_get_size(xc_handle, &size) != 0 )
-    {
-        perror("Failure to get tbuf info from Xen. Guess size is 0");
-        printf("This may mean that tracing is not enabled in xen.\n");
-    }
-    else
-    {
-        printf("Current tbuf size: 0x%lx\n", size);
-    }
-
-    if (argc < 2)
-        exit(0);
-
-    size = atol(argv[1]);
-
-    if ( xc_tbuf_set_size(xc_handle, size) != 0 )
-    {
-        perror("set_size Hypercall failure");
-        exit(1);
-    }
-    printf("set_size succeeded.\n");
-  
-    if (xc_tbuf_get_size(xc_handle, &size) != 0)
-        perror("Failure to get tbuf info from Xen."
-               " Tracing must be enabled first");
-    else
-        printf("New tbuf size: 0x%lx\n", size);
-  
-    xc_interface_close(xc_handle);
-    return 0;
-}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] PATCH: Rename setsize and setmask, Rob Gardner <=