Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965376AbcKOBlo (ORCPT ); Mon, 14 Nov 2016 20:41:44 -0500 Received: from merlin.infradead.org ([205.233.59.134]:35554 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941288AbcKOBj2 (ORCPT ); Mon, 14 Nov 2016 20:39:28 -0500 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Andi Kleen , David Ahern , Namhyung Kim , Peter Zijlstra , William Cohen , Arnaldo Carvalho de Melo Subject: [PATCH 04/15] tools build: Add jvmti feature detection support Date: Mon, 14 Nov 2016 22:38:36 -0300 Message-Id: <1479173927-24613-5-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479173927-24613-1-git-send-email-acme@kernel.org> References: <1479173927-24613-1-git-send-email-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1948 Lines: 66 From: Jiri Olsa 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(-) create mode 100644 tools/build/feature/test-jvmti.c diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index ac9c477a2a48..8f668bce8996 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 000000000000..1c665f09b9d6 --- /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; +} -- 2.7.4