debug.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 struct ui_progress *ui_progress__new(const char *title __used,
  17. u64 total __used)
  18. {
  19. return (struct ui_progress *)1;
  20. }
  21. static inline void ui_progress__update(struct ui_progress *self __used,
  22. u64 curr __used) {}
  23. static inline void ui_progress__delete(struct ui_progress *self __used) {}
  24. #else
  25. extern char ui_helpline__last_msg[];
  26. int ui_helpline__show_help(const char *format, va_list ap);
  27. #include "ui/progress.h"
  28. #endif
  29. void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
  30. void ui__warning_paranoid(void);
  31. #endif /* __PERF_DEBUG_H */