debug.h 1004 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* For debugging general purposes */
  2. #ifndef __PERF_DEBUG_H
  3. #define __PERF_DEBUG_H
  4. #include "event.h"
  5. extern int verbose;
  6. extern int dump_trace;
  7. int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
  8. void trace_event(event_t *event);
  9. struct ui_progress;
  10. #ifdef NO_NEWT_SUPPORT
  11. static inline int browser__show_help(const char *format __used, va_list ap __used)
  12. {
  13. return 0;
  14. }
  15. static inline struct ui_progress *ui_progress__new(const char *title __used,
  16. u64 total __used)
  17. {
  18. return (struct ui_progress *)1;
  19. }
  20. static inline void ui_progress__update(struct ui_progress *self __used,
  21. u64 curr __used) {}
  22. static inline void ui_progress__delete(struct ui_progress *self __used) {}
  23. #else
  24. int browser__show_help(const char *format, va_list ap);
  25. struct ui_progress *ui_progress__new(const char *title, u64 total);
  26. void ui_progress__update(struct ui_progress *self, u64 curr);
  27. void ui_progress__delete(struct ui_progress *self);
  28. #endif
  29. #endif /* __PERF_DEBUG_H */