cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

internal.h (851B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef __LIBPERF_INTERNAL_H
      3#define __LIBPERF_INTERNAL_H
      4
      5#include <perf/core.h>
      6
      7void libperf_print(enum libperf_print_level level,
      8		   const char *format, ...)
      9	__attribute__((format(printf, 2, 3)));
     10
     11#define __pr(level, fmt, ...)   \
     12do {                            \
     13	libperf_print(level, "libperf: " fmt, ##__VA_ARGS__);     \
     14} while (0)
     15
     16#define pr_err(fmt, ...)        __pr(LIBPERF_ERR, fmt, ##__VA_ARGS__)
     17#define pr_warning(fmt, ...)    __pr(LIBPERF_WARN, fmt, ##__VA_ARGS__)
     18#define pr_info(fmt, ...)       __pr(LIBPERF_INFO, fmt, ##__VA_ARGS__)
     19#define pr_debug(fmt, ...)      __pr(LIBPERF_DEBUG, fmt, ##__VA_ARGS__)
     20#define pr_debug2(fmt, ...)     __pr(LIBPERF_DEBUG2, fmt, ##__VA_ARGS__)
     21#define pr_debug3(fmt, ...)     __pr(LIBPERF_DEBUG3, fmt, ##__VA_ARGS__)
     22
     23#endif /* __LIBPERF_INTERNAL_H */