blob: 7a17ee061bcbd4c80ed42084e12bc61b834fa8b3 [file] [log] [blame]
Frederic Weisbeckercd84c2a2009-08-12 10:03:49 +02001/* For debugging general purposes */
John Kacur8b40f522009-09-24 18:02:18 +02002#ifndef __PERF_DEBUG_H
3#define __PERF_DEBUG_H
Frederic Weisbeckercd84c2a2009-08-12 10:03:49 +02004
Ian Munsiec0555642010-04-13 18:37:33 +10005#include <stdbool.h>
Arnaldo Carvalho de Melo8f411462009-11-16 16:32:42 -02006#include "event.h"
7
Frederic Weisbeckercd84c2a2009-08-12 10:03:49 +02008extern int verbose;
Ian Munsiec0555642010-04-13 18:37:33 +10009extern bool dump_trace;
Frederic Weisbeckercd84c2a2009-08-12 10:03:49 +020010
Frederic Weisbecker2cec19d2009-08-16 19:24:21 +020011int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
Frederic Weisbecker8f288272009-08-16 22:05:48 +020012void trace_event(event_t *event);
Arnaldo Carvalho de Melo567e5472010-03-12 21:05:10 -030013
Arnaldo Carvalho de Melo5f4d3f82010-03-26 21:16:22 -030014struct ui_progress;
15
Arnaldo Carvalho de Melo567e5472010-03-12 21:05:10 -030016#ifdef NO_NEWT_SUPPORT
Arnaldo Carvalho de Melo1e6dd072010-08-10 15:58:50 -030017static inline int ui_helpline__show_help(const char *format __used, va_list ap __used)
Arnaldo Carvalho de Melo567e5472010-03-12 21:05:10 -030018{
19 return 0;
20}
Arnaldo Carvalho de Melo5f4d3f82010-03-26 21:16:22 -030021
22static inline struct ui_progress *ui_progress__new(const char *title __used,
23 u64 total __used)
24{
25 return (struct ui_progress *)1;
26}
27
28static inline void ui_progress__update(struct ui_progress *self __used,
29 u64 curr __used) {}
30
31static inline void ui_progress__delete(struct ui_progress *self __used) {}
Arnaldo Carvalho de Melo567e5472010-03-12 21:05:10 -030032#else
Arnaldo Carvalho de Melo1e6dd072010-08-10 15:58:50 -030033extern char ui_helpline__last_msg[];
34int ui_helpline__show_help(const char *format, va_list ap);
Arnaldo Carvalho de Melo34cea7f2010-08-08 19:56:47 -030035#include "ui/progress.h"
Arnaldo Carvalho de Melo567e5472010-03-12 21:05:10 -030036#endif
John Kacur8b40f522009-09-24 18:02:18 +020037
38#endif /* __PERF_DEBUG_H */