linux/tools/perf/util/debug.h
<<
>>
Prefs
   1/* For debugging general purposes */
   2#ifndef __PERF_DEBUG_H
   3#define __PERF_DEBUG_H
   4
   5#include <stdbool.h>
   6#include "event.h"
   7#include "../ui/helpline.h"
   8
   9extern int verbose;
  10extern bool quiet, dump_trace;
  11
  12int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
  13void trace_event(union perf_event *event);
  14
  15struct ui_progress;
  16struct perf_error_ops;
  17
  18#if defined(NEWT_SUPPORT) || defined(GTK2_SUPPORT)
  19
  20#include "../ui/progress.h"
  21int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
  22#include "../ui/util.h"
  23
  24#else
  25
  26static inline void ui_progress__update(u64 curr __maybe_unused,
  27                                       u64 total __maybe_unused,
  28                                       const char *title __maybe_unused) {}
  29static inline void ui_progress__finish(void) {}
  30
  31#define ui__error(format, arg...) ui__warning(format, ##arg)
  32
  33static inline int
  34perf_error__register(struct perf_error_ops *eops __maybe_unused)
  35{
  36        return 0;
  37}
  38
  39static inline int
  40perf_error__unregister(struct perf_error_ops *eops __maybe_unused)
  41{
  42        return 0;
  43}
  44
  45#endif /* NEWT_SUPPORT || GTK2_SUPPORT */
  46
  47int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
  48int ui__error_paranoid(void);
  49
  50#endif  /* __PERF_DEBUG_H */
  51