1 // SPDX-License-Identifier: GPL-2.0-only
3 #define __printf(a, b) __attribute__((format(printf, a, b)))
8 #include <linux/compiler.h>
10 #include <internal/lib.h>
13 static int __base_pr(enum libperf_print_level level __maybe_unused
, const char *format
,
16 return vfprintf(stderr
, format
, args
);
19 static libperf_print_fn_t __libperf_pr
= __base_pr
;
22 void libperf_print(enum libperf_print_level level
, const char *format
, ...)
29 va_start(args
, format
);
30 __libperf_pr(level
, format
, args
);
34 void libperf_init(libperf_print_fn_t fn
)
36 page_size
= sysconf(_SC_PAGE_SIZE
);