|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [IA64] postat tool
# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID f6feefcd10468f237a64be5725a50b91ffdd7fbe
# Parent d75f733f328c9b5df761c442f6450f904ab1b094
[IA64] postat tool
Small utility to display and clear privop statistics.
Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
diff -r d75f733f328c -r f6feefcd1046 xen/arch/ia64/tools/privop/Makefile
--- /dev/null Thu Mar 16 19:10:22 2006
+++ b/xen/arch/ia64/tools/privop/Makefile Thu Mar 16 19:13:23 2006
@@ -0,0 +1,11 @@
+CC=gcc
+CFLAGS=-O -Wall
+
+all: postat
+
+postat: postat.c pohcalls.o
+
+clean:
+ $(RM) -f *.o postat *.s *~
+
+
diff -r d75f733f328c -r f6feefcd1046 xen/arch/ia64/tools/privop/pohcalls.S
--- /dev/null Thu Mar 16 19:10:22 2006
+++ b/xen/arch/ia64/tools/privop/pohcalls.S Thu Mar 16 19:13:23 2006
@@ -0,0 +1,30 @@
+ .file "hypercall.S"
+ .pred.safe_across_calls p1-p5,p16-p63
+ .text
+ .align 16
+ .global dump_privop_counts#
+ .proc dump_privop_counts#
+dump_privop_counts:
+ .prologue
+ .body
+ mov r2 = 0xffff
+ ;;
+ break 0x1000
+ ;;
+ br.ret.sptk.many b0
+ ;;
+ .endp dump_privop_counts#
+ .align 16
+ .global zero_privop_counts#
+ .proc zero_privop_counts#
+zero_privop_counts:
+ .prologue
+ .body
+ mov r2 = 0xfffe
+ ;;
+ break 0x1000
+ ;;
+ br.ret.sptk.many b0
+ ;;
+ .endp zero_privop_counts#
+
diff -r d75f733f328c -r f6feefcd1046 xen/arch/ia64/tools/privop/postat.c
--- /dev/null Thu Mar 16 19:10:22 2006
+++ b/xen/arch/ia64/tools/privop/postat.c Thu Mar 16 19:13:23 2006
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <string.h>
+
+extern int dump_privop_counts (char *buf, int len);
+
+extern int zero_privop_counts (char *buf, int len);
+
+int
+main (int argc, char *argv[])
+{
+ static char buf[8192];
+ int res;
+
+ if (argc == 1)
+ res = dump_privop_counts (buf, sizeof (buf));
+ else if (argc == 2 && strcmp (argv[1], "--clear") == 0)
+ res = zero_privop_counts (buf, sizeof (buf));
+ else
+ {
+ printf ("usage: %s [--clear]\n", argv[0]);
+ return 1;
+ }
+ printf ("res=%d\n", res);
+ fputs (buf, stdout);
+
+ return 0;
+}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [IA64] postat tool,
Xen patchbot -unstable <=
|
|
|
|
|