diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-11-21 16:43:41 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-11-21 22:39:58 -0300 |
commit | dd1d0044dd1c1bf84a9b3e1f24e43347b26b96a0 (patch) | |
tree | 9643fd65a3ec118a2e36615322904c9e7bc8c008 /tools/build | |
parent | ecd94f1be3033e27a74eccdb29ee9884a01cf32b (diff) | |
download | linux-next-dd1d0044dd1c1bf84a9b3e1f24e43347b26b96a0.tar.gz |
perf jvmti: Separate jvmti cmlr check
The Compiled Method Load Record (cmlr) is JDK specific interface to
access JVM stack info. This makes the jvmti agent code not compile under
another jdk, which does not support that.
Separating jvmti cmlr check into special feature check, and adding
HAVE_JVMTI_CMLR macro to indicate that.
Mark cmlr code in jvmti/libjvmti.c with HAVE_JVMTI_CMLR, so we can
compile it on system without cmlr support.
This change makes the jvmti compile with java-1.8.0-ibm package. It's
without the line numbers support, but the rest works.
Adding NO_JVMTI_CMLR compile variable for testing.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ben Gainey <ben.gainey@arm.com>
Cc: Gustavo Luiz Duarte <gduarte@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20181121154341.21521-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build')
-rw-r--r-- | tools/build/feature/Makefile | 4 | ||||
-rw-r--r-- | tools/build/feature/test-jvmti-cmlr.c | 11 | ||||
-rw-r--r-- | tools/build/feature/test-jvmti.c | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 325087a0429c..38c22e122cb0 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -55,6 +55,7 @@ FILES= \ test-sdt.bin \ test-cxx.bin \ test-jvmti.bin \ + test-jvmti-cmlr.bin \ test-sched_getcpu.bin \ test-setns.bin \ test-libopencsd.bin \ @@ -267,6 +268,9 @@ $(OUTPUT)test-cxx.bin: $(OUTPUT)test-jvmti.bin: $(BUILD) +$(OUTPUT)test-jvmti-cmlr.bin: + $(BUILD) + $(OUTPUT)test-llvm.bin: $(BUILDXX) -std=gnu++11 \ -I$(shell $(LLVM_CONFIG) --includedir) \ diff --git a/tools/build/feature/test-jvmti-cmlr.c b/tools/build/feature/test-jvmti-cmlr.c new file mode 100644 index 000000000000..c27b5b71a0f6 --- /dev/null +++ b/tools/build/feature/test-jvmti-cmlr.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <jvmti.h> +#include <jvmticmlr.h> + +int main(void) +{ + jvmtiCompiledMethodLoadInlineRecord rec __attribute__((unused)); + jvmtiCompiledMethodLoadRecordHeader hdr __attribute__((unused)); + PCStackInfo p __attribute__((unused)); + return 0; +} diff --git a/tools/build/feature/test-jvmti.c b/tools/build/feature/test-jvmti.c index 5cf31192f204..799916d2e3e3 100644 --- a/tools/build/feature/test-jvmti.c +++ b/tools/build/feature/test-jvmti.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include <jvmti.h> -#include <jvmticmlr.h> int main(void) { |