debug.h 974 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* For debugging general purposes */
  2. #ifndef __PERF_DEBUG_H
  3. #define __PERF_DEBUG_H
  4. #include <stdbool.h>
  5. #include "event.h"
  6. extern int verbose;
  7. extern bool quiet, dump_trace;
  8. int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
  9. void trace_event(union perf_event *event);
  10. struct ui_progress;
  11. #ifdef NO_NEWT_SUPPORT
  12. static inline int ui_helpline__show_help(const char *format __used, va_list ap __used)
  13. {
  14. return 0;
  15. }
  16. static inline void ui_progress__update(u64 curr __used, u64 total __used,
  17. const char *title __used) {}
  18. #define ui__error(format, arg...) ui__warning(format, ##arg)
  19. #else
  20. extern char ui_helpline__last_msg[];
  21. int ui_helpline__show_help(const char *format, va_list ap);
  22. #include "ui/progress.h"
  23. int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
  24. #endif
  25. int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
  26. int ui__error_paranoid(void);
  27. #endif /* __PERF_DEBUG_H */