aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-09-28 05:32:03 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-02 17:36:23 -0400
commitf9f526ecdc09a851f4f5567ebcf9bc553778f6c2 (patch)
tree1ddf1f736e35b7a130819ad5a49b0fc937728603 /tools/perf/util/hist.h
parent1254b51e32649f2d34ec6b070ed36717c5a6b825 (diff)
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 843638d0287f..6ca74079d5c9 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
187#define K_RIGHT -2 187#define K_RIGHT -2
188#endif 188#endif
189 189
190#ifdef NO_GTK2_SUPPORT 190#ifdef GTK2_SUPPORT
191int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
192 void(*timer)(void *arg), void *arg,
193 int refresh);
194#else
191static inline 195static inline
192int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused, 196int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused,
193 const char *help __maybe_unused, 197 const char *help __maybe_unused,
@@ -197,11 +201,6 @@ int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist __maybe_unused,
197{ 201{
198 return 0; 202 return 0;
199} 203}
200
201#else
202int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
203 void(*timer)(void *arg), void *arg,
204 int refresh);
205#endif 204#endif
206 205
207unsigned int hists__sort_list_width(struct hists *self); 206unsigned int hists__sort_list_width(struct hists *self);