Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755527AbcKOKnF (ORCPT ); Tue, 15 Nov 2016 05:43:05 -0500 Received: from terminus.zytor.com ([198.137.202.10]:50760 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753292AbcKOKnC (ORCPT ); Tue, 15 Nov 2016 05:43:02 -0500 Date: Tue, 15 Nov 2016 02:42:36 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org, hpa@zytor.com, eranian@google.com, andi@firstfloor.org, tglx@linutronix.de, mingo@kernel.org, dsahern@gmail.com, acme@redhat.com, wcohen@redhat.com, jolsa@kernel.org, namhyung@kernel.org Reply-To: eranian@google.com, andi@firstfloor.org, tglx@linutronix.de, mingo@kernel.org, dsahern@gmail.com, jolsa@kernel.org, wcohen@redhat.com, acme@redhat.com, namhyung@kernel.org, a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: <1478093749-5602-3-git-send-email-jolsa@kernel.org> References: <1478093749-5602-3-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools build: Add jvmti feature detection support Git-Commit-ID: 285932a25879602407f207e862bc5b8416711f42 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2195 Lines: 70 Commit-ID: 285932a25879602407f207e862bc5b8416711f42 Gitweb: http://git.kernel.org/tip/285932a25879602407f207e862bc5b8416711f42 Author: Jiri Olsa AuthorDate: Wed, 2 Nov 2016 14:35:48 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 14 Nov 2016 12:40:32 -0300 tools build: Add jvmti feature detection support Adding support to detect jvmti support. It is not plugged into the FEATURE_TESTS machinery, because it's quite rare and will be used separately from perf via feature_check call. Signed-off-by: Jiri Olsa Tested-by: Stephane Eranian Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: William Cohen Link: http://lkml.kernel.org/r/1478093749-5602-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/build/feature/Makefile | 6 +++++- tools/build/feature/test-jvmti.c | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index ac9c477..8f668bc 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -47,7 +47,8 @@ FILES= \ test-bpf.bin \ test-get_cpuid.bin \ test-sdt.bin \ - test-cxx.bin + test-cxx.bin \ + test-jvmti.bin FILES := $(addprefix $(OUTPUT),$(FILES)) @@ -225,6 +226,9 @@ $(OUTPUT)test-sdt.bin: $(OUTPUT)test-cxx.bin: $(BUILDXX) -std=gnu++11 +$(OUTPUT)test-jvmti.bin: + $(BUILD) + -include $(OUTPUT)*.d ############################### diff --git a/tools/build/feature/test-jvmti.c b/tools/build/feature/test-jvmti.c new file mode 100644 index 0000000..1c665f0 --- /dev/null +++ b/tools/build/feature/test-jvmti.c @@ -0,0 +1,13 @@ +#include +#include + +int main(void) +{ + JavaVM jvm __attribute__((unused)); + jvmtiEventCallbacks cb __attribute__((unused)); + jvmtiCapabilities caps __attribute__((unused)); + jvmtiJlocationFormat format __attribute__((unused)); + jvmtiEnv jvmti __attribute__((unused)); + + return 0; +}