#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");
0
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340