aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/debug.c
blob: 7cb8464abe61b35972371abe8d8a18bd03c27f05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* For general debugging purposes */

#include "../perf.h"
#include <string.h>
#include <stdarg.h>
#include <stdio.h>

int verbose = 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;
}