~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/debug.h

Version: ~ [ linux-5.9.1 ] ~ [ linux-5.8.16 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.72 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.152 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.202 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.240 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.240 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /* For debugging general purposes */
  3 #ifndef __PERF_DEBUG_H
  4 #define __PERF_DEBUG_H
  5 
  6 #include <stdbool.h>
  7 #include <string.h>
  8 #include <linux/compiler.h>
  9 #include "event.h"
 10 #include "../ui/helpline.h"
 11 #include "../ui/progress.h"
 12 #include "../ui/util.h"
 13 
 14 extern int verbose;
 15 extern bool quiet, dump_trace;
 16 extern int debug_ordered_events;
 17 extern int debug_data_convert;
 18 
 19 #ifndef pr_fmt
 20 #define pr_fmt(fmt) fmt
 21 #endif
 22 
 23 #define pr_err(fmt, ...) \
 24         eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
 25 #define pr_warning(fmt, ...) \
 26         eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
 27 #define pr_info(fmt, ...) \
 28         eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)
 29 #define pr_debug(fmt, ...) \
 30         eprintf(1, verbose, pr_fmt(fmt), ##__VA_ARGS__)
 31 #define pr_debugN(n, fmt, ...) \
 32         eprintf(n, verbose, pr_fmt(fmt), ##__VA_ARGS__)
 33 #define pr_debug2(fmt, ...) pr_debugN(2, pr_fmt(fmt), ##__VA_ARGS__)
 34 #define pr_debug3(fmt, ...) pr_debugN(3, pr_fmt(fmt), ##__VA_ARGS__)
 35 #define pr_debug4(fmt, ...) pr_debugN(4, pr_fmt(fmt), ##__VA_ARGS__)
 36 
 37 #define pr_time_N(n, var, t, fmt, ...) \
 38         eprintf_time(n, var, t, fmt, ##__VA_ARGS__)
 39 
 40 #define pr_oe_time(t, fmt, ...)  pr_time_N(1, debug_ordered_events, t, pr_fmt(fmt), ##__VA_ARGS__)
 41 #define pr_oe_time2(t, fmt, ...) pr_time_N(2, debug_ordered_events, t, pr_fmt(fmt), ##__VA_ARGS__)
 42 
 43 #define STRERR_BUFSIZE  128     /* For the buffer size of str_error_r */
 44 
 45 int dump_printf(const char *fmt, ...) __printf(1, 2);
 46 void trace_event(union perf_event *event);
 47 
 48 int ui__error(const char *format, ...) __printf(1, 2);
 49 int ui__warning(const char *format, ...) __printf(1, 2);
 50 
 51 void pr_stat(const char *fmt, ...);
 52 
 53 int eprintf(int level, int var, const char *fmt, ...) __printf(3, 4);
 54 int eprintf_time(int level, int var, u64 t, const char *fmt, ...) __printf(4, 5);
 55 int veprintf(int level, int var, const char *fmt, va_list args);
 56 
 57 int perf_debug_option(const char *str);
 58 void perf_debug_setup(void);
 59 int perf_quiet_option(void);
 60 
 61 void dump_stack(void);
 62 void sighandler_dump_stack(int sig);
 63 
 64 #endif  /* __PERF_DEBUG_H */
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp