mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@redhat.com>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Ahern <dsahern@gmail.com>
Subject: [BUG/RFC 3/3] perf tools: Add missing GTK2_SUPPORT ifdefs
Date: Fri, 27 Sep 2013 16:32:12 +0200	[thread overview]
Message-ID: <1380292332-6518-3-git-send-email-jolsa@redhat.com> (raw)
In-Reply-To: <1380292332-6518-1-git-send-email-jolsa@redhat.com>

When building minimal perf via:
  NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1
  NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1
  NO_LIBBIONIC=1

We dont link -ldl and that's causing error for gtk2 related code,
which is disabled on command line (NO_GTK2), but not in the code
(GTK2_SUPPORT).

We probably need some global fix/change for this browser
enabled/disable code.

Tested just by building it corretly.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
---
 tools/perf/builtin-annotate.c | 6 ++++++
 tools/perf/builtin-report.c   | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 577c3a1..ddde407 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -142,6 +142,7 @@ find_next:
 		}
 
 		if (use_browser == 2) {
+#ifdef GTK2_SUPPORT
 			int ret;
 			int (*annotate)(struct hist_entry *he,
 					struct perf_evsel *evsel,
@@ -161,6 +162,9 @@ find_next:
 			/* skip missing symbols */
 			nd = rb_next(nd);
 		} else if (use_browser == 1) {
+#else
+			use_browser = 1;
+#endif
 			key = hist_entry__tui_annotate(he, evsel, NULL);
 			switch (key) {
 			case -1:
@@ -258,6 +262,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
 		goto out_delete;
 	}
 
+#ifdef GTK2_SUPPORT
 	if (use_browser == 2) {
 		void (*show_annotations)(void);
 
@@ -269,6 +274,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
 		}
 		show_annotations();
 	}
+#endif
 
 out_delete:
 	/*
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 295025e..c902229 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -591,6 +591,7 @@ static int __cmd_report(struct perf_report *rep)
 				ret = 0;
 
 		} else if (use_browser == 2) {
+#ifdef GTK2_SUPPORT
 			int (*hist_browser)(struct perf_evlist *,
 					    const char *,
 					    struct hist_browser_timer *,
@@ -604,6 +605,7 @@ static int __cmd_report(struct perf_report *rep)
 			}
 			hist_browser(session->evlist, help, NULL,
 				     rep->min_percent);
+#endif
 		}
 	} else
 		perf_evlist__tty_browse_hists(session->evlist, rep, help);
-- 
1.7.11.7


  parent reply	other threads:[~2013-09-27 14:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 18:55 [PATCH] perf tools: Add missing -ldl for gtk build Jiri Olsa
2013-09-27  2:27 ` Namhyung Kim
2013-09-27 14:32 ` [PATCH 1/3] perf tools: Separate lbfd check out of NO_DEMANGLE condition Jiri Olsa
2013-09-27 14:32   ` [PATCH 2/3] perf tools: Adding missing ifdef for cmd_trace call Jiri Olsa
2013-09-27 14:32   ` Jiri Olsa [this message]
2013-09-27 18:54     ` [BUG/RFC 3/3] perf tools: Add missing GTK2_SUPPORT ifdefs Arnaldo Carvalho de Melo
2013-09-29  6:54       ` Namhyung Kim
2013-09-29  6:52   ` [PATCH 1/3] perf tools: Separate lbfd check out of NO_DEMANGLE condition Namhyung Kim
2013-09-30  3:13     ` Jiri Olsa
2013-10-02  1:18     ` Namhyung Kim
2013-10-02  8:17       ` Jiri Olsa
2013-10-02  8:38         ` Namhyung Kim
2013-10-02 10:08           ` Ingo Molnar
2013-10-15  5:28 ` [tip:perf/core] perf tools: Add missing -ldl for gtk build tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380292332-6518-3-git-send-email-jolsa@redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®