
Separate out GTK codes to a shared object called libperf-gtk.so. This time only GTK codes are built with -fPIC and libperf remains as is. Now run GTK hist and annotation browser using libdl. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Pekka Enberg <penberg@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1379053663-13706-1-git-send-email-namhyung@kernel.org [ Fix it up wrt Ingo's tools/perf build speedups ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
68 lines
1.6 KiB
C
68 lines
1.6 KiB
C
#ifndef _PERF_GTK_H_
|
|
#define _PERF_GTK_H_ 1
|
|
|
|
#include <stdbool.h>
|
|
|
|
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
|
#include <gtk/gtk.h>
|
|
#pragma GCC diagnostic error "-Wstrict-prototypes"
|
|
|
|
|
|
struct perf_gtk_context {
|
|
GtkWidget *main_window;
|
|
GtkWidget *notebook;
|
|
|
|
#ifdef HAVE_GTK_INFO_BAR_SUPPORT
|
|
GtkWidget *info_bar;
|
|
GtkWidget *message_label;
|
|
#endif
|
|
GtkWidget *statbar;
|
|
guint statbar_ctx_id;
|
|
};
|
|
|
|
int perf_gtk__init(void);
|
|
void perf_gtk__exit(bool wait_for_ok);
|
|
|
|
extern struct perf_gtk_context *pgctx;
|
|
|
|
static inline bool perf_gtk__is_active_context(struct perf_gtk_context *ctx)
|
|
{
|
|
return ctx && ctx->main_window;
|
|
}
|
|
|
|
struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window);
|
|
int perf_gtk__deactivate_context(struct perf_gtk_context **ctx);
|
|
|
|
void perf_gtk__init_helpline(void);
|
|
void perf_gtk__init_progress(void);
|
|
void perf_gtk__init_hpp(void);
|
|
|
|
void perf_gtk__signal(int sig);
|
|
void perf_gtk__resize_window(GtkWidget *window);
|
|
const char *perf_gtk__get_percent_color(double percent);
|
|
GtkWidget *perf_gtk__setup_statusbar(void);
|
|
|
|
#ifdef HAVE_GTK_INFO_BAR_SUPPORT
|
|
GtkWidget *perf_gtk__setup_info_bar(void);
|
|
#else
|
|
static inline GtkWidget *perf_gtk__setup_info_bar(void)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif
|
|
|
|
struct perf_evsel;
|
|
struct perf_evlist;
|
|
struct hist_entry;
|
|
struct hist_browser_timer;
|
|
|
|
int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
|
|
struct hist_browser_timer *hbt,
|
|
float min_pcnt);
|
|
int hist_entry__gtk_annotate(struct hist_entry *he,
|
|
struct perf_evsel *evsel,
|
|
struct hist_browser_timer *hbt);
|
|
void perf_gtk__show_annotations(void);
|
|
|
|
#endif /* _PERF_GTK_H_ */
|