debuggers.hg

view xen/arch/ia64/tools/privop/postat.c @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 #include <stdio.h>
2 #include <string.h>
4 extern int dump_privop_counts (char *buf, int len);
6 extern int zero_privop_counts (char *buf, int len);
8 int
9 main (int argc, char *argv[])
10 {
11 static char buf[8192];
12 int res;
14 if (argc == 1)
15 res = dump_privop_counts (buf, sizeof (buf));
16 else if (argc == 2 && strcmp (argv[1], "--clear") == 0)
17 res = zero_privop_counts (buf, sizeof (buf));
18 else
19 {
20 printf ("usage: %s [--clear]\n", argv[0]);
21 return 1;
22 }
23 printf ("res=%d\n", res);
24 fputs (buf, stdout);
26 return 0;
27 }