Fix the tools build:

1. xenctrl.h needs to include stddef.h to define size_t
 2. tbctl is broken -- remove it since xenmon and xentrace
    both automatcially enable tracing now
 3. Fix setsize after xc_tbug interface changes

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-05-16 13:35:59 +01:00
1 parent 4eabcb748c
commit dbb16ea9d1
3 files changed
+30 -25

No files matched your search

+1
View File
@@ -9,6 +9,7 @@
#ifndef XENCTRL_H
#define XENCTRL_H
#include <stddef.h>
#include <stdint.h>
#include <sys/ptrace.h>
#include <xen/xen.h>
+1 -1
View File
@@ -14,7 +14,7 @@ CFLAGS += -I $(XEN_LIBXC)
HDRS = $(wildcard *.h)
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
BIN = xentrace tbctl setsize
BIN = xentrace setsize
LIBBIN =
SCRIPTS = xentrace_format
MAN1 = $(wildcard *.1)
+28 -24
View File
@@ -5,33 +5,37 @@
int main(int argc, char * argv[])
{
unsigned int size;
int xc_handle = xc_interface_open();
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");
// exit(1);
}
else
printf("Current tbuf size: 0x%x\n", size);
if (argc < 2)
exit(0);
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);
}
size = atoi(argv[1]);
if (argc < 2)
exit(0);
if (xc_tbuf_set_size(xc_handle, size) != 0) {
perror("set_size Hypercall failure");
exit(1);
}
printf("set_size succeeded.\n");
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%x\n", size);
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;
xc_interface_close(xc_handle);
return 0;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.