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