dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/tools/perf/util/debug.c

38 lines
510 B
C
Raw Normal View History

/* For general debugging purposes */
#include "../perf.h"
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
int verbose = 0;
int dump_trace = 0;
int eprintf(const char *fmt, ...)
{
va_list args;
int ret = 0;
if (verbose) {
va_start(args, fmt);
ret = vfprintf(stderr, fmt, args);
va_end(args);
}
return ret;
}
int dump_printf(const char *fmt, ...)
{
va_list args;
int ret = 0;
if (dump_trace) {
va_start(args, fmt);
ret = vprintf(fmt, args);
va_end(args);
}
return ret;
}