* PATCH: Rename setsize and setmask
@ 2006-08-15 21:31 Rob Gardner
0 siblings, 0 replies; only message in thread
From: Rob Gardner @ 2006-08-15 21:31 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 10122 bytes --]
As requested, a simple renaming to make it obvious that setmask and
setsize are xen related.
Signed-off-by: Rob Gardner <rob.gardner@hp.com>
# HG changeset patch
# User rob.gardner@hp.com
# 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@hp.com
+ * Diwaker Gupta, diwaker.gupta@hp.com
+ * 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@hp.com
- * Diwaker Gupta, diwaker.gupta@hp.com
- * 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;
-}
[-- Attachment #2: setmask.patch --]
[-- Type: text/plain, Size: 9926 bytes --]
# HG changeset patch
# User rob.gardner@hp.com
# 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@hp.com
+ * Diwaker Gupta, diwaker.gupta@hp.com
+ * 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@hp.com
- * Diwaker Gupta, diwaker.gupta@hp.com
- * 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;
-}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-15 21:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-15 21:31 PATCH: Rename setsize and setmask Rob Gardner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.