From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Stephane Eranian <eranian@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Andi Kleen <ak@linux.intel.com>, David Ahern <dsahern@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Kan Liang <kan.liang@intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/10] perf jvmti: Add check for java alternatives cmd in Makefile
Date: Tue, 16 Feb 2016 17:34:47 -0300 [thread overview]
Message-ID: <1455654896-14205-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1455654896-14205-1-git-send-email-acme@kernel.org>
From: Stephane Eranian <eranian@google.com>
This patch modifies the jvmti makefile to check if the
/usr/sbin/java-update-alternatives utility is present. If so, then use
it, if not then use the altenatives command.
This helps handle the difference between Ubuntu and Fedora Linux
distributions.
Signed-off-by: Stephane Eranian <eranian@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1455604661-9357-1-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/jvmti/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/jvmti/Makefile b/tools/perf/jvmti/Makefile
index 5968f8332a28..0277a64b391b 100644
--- a/tools/perf/jvmti/Makefile
+++ b/tools/perf/jvmti/Makefile
@@ -35,8 +35,12 @@ SOLIBEXT=so
# The following works at least on fedora 23, you may need the next
# line for other distros.
+ifeq (,$(wildcard /usr/sbin/update-java-alternatives))
JDIR=$(shell alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
-#JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d ' ' -f 3)
+else
+JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d ' ' -f 3)
+endif
+
# -lrt required in 32-bit mode for clock_gettime()
LIBS=-lelf -lrt
INCDIR=-I $(JDIR)/include -I $(JDIR)/include/linux
--
2.5.0
next prev parent reply other threads:[~2016-02-16 20:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 20:34 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-02-16 20:34 ` Arnaldo Carvalho de Melo [this message]
2016-02-16 20:34 ` [PATCH 02/10] tools lib api: Add debug output support Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 03/10] tools lib api fs: Adopt filename__read_str from perf Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 04/10] tools lib api fs: Add sysfs__read_str function Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 05/10] perf debug: Rename __eprintf(va_list args) to veprintf Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 06/10] perf tools: Initialize libapi debug output Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 07/10] perf tools: Add perf data cache feature Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 08/10] perf stat: Abstract stat metrics printing Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 09/10] perf stat: Add support for metrics in interval mode Arnaldo Carvalho de Melo
2016-02-16 20:34 ` [PATCH 10/10] perf stat: Move noise/running printing into printout Arnaldo Carvalho de Melo
2016-02-17 7:39 ` [GIT PULL 00/10] perf/core improvements and fixes Ingo Molnar
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=1455654896-14205-2-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).