1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __LIBPERF_CORE_H 3 #define __LIBPERF_CORE_H 4 5 #include <stdarg.h> 6 7 #ifndef LIBPERF_API 8 #define LIBPERF_API __attribute__((visibility("default"))) 9 #endif 10 11 enum libperf_print_level { 12 LIBPERF_ERR, 13 LIBPERF_WARN, 14 LIBPERF_INFO, 15 LIBPERF_DEBUG, 16 LIBPERF_DEBUG2, 17 LIBPERF_DEBUG3, 18 }; 19 20 typedef int (*libperf_print_fn_t)(enum libperf_print_level level, 21 const char *, va_list ap); 22 23 LIBPERF_API void libperf_init(libperf_print_fn_t fn); 24 25 #endif /* __LIBPERF_CORE_H */ 26