summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-09-28 18:32:03 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-02 18:36:23 -0300
commitf9f526ecdc09a851f4f5567ebcf9bc553778f6c2 (patch)
tree1ddf1f736e35b7a130819ad5a49b0fc937728603 /tools/perf/util/hist.h
parent1254b51e32649f2d34ec6b070ed36717c5a6b825 (diff)
downloadop-kernel-dev-f9f526ecdc09a851f4f5567ebcf9bc553778f6c2.zip
op-kernel-dev-f9f526ecdc09a851f4f5567ebcf9bc553778f6c2.tar.gz
perf tools: Convert to GTK2_SUPPORT
For building perf without gtk+2, we can set NO_GTK2=1 as a argument of make. It then defines NO_GTK2_SUPPORT macro for C code to do the proper handling. However it usually used in a negative semantics - e.g. #ifndef - so we saw double negations which can be misleading. Convert it to a positive form to make it more readable. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1348824728-14025-8-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r--tools/perf/util/hist.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 843638d..6ca7407 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -187,7 +187,11 @@ static inline int hist_entry__tui_annotate(struct hist_entry *self
#define K_RIGHT -2
#endif
-#ifdef NO_GTK2_SUPPORT
+#ifdef GTK2_SUPPORT
+int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
+ void(*timer)(void *arg), void *arg,
+ int refresh);
+#else
static inline
int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused,
const char *help __maybe_unused,
@@ -197,11 +201,6 @@ int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused,
{
return 0;
}
-
-#else
-int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
- void(*timer)(void *arg), void *arg,
- int refresh);
#endif
unsigned int hists__sort_list_width(struct hists *self);
OpenPOWER on IntegriCloud