mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ben Gainey <[email protected]> Cc: Gustavo Luiz Duarte <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
ecd94f1be3
commit
dd1d0044dd
6 changed files with 37 additions and 1 deletions
|
|
@ -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) \
|
||||
|
|
|
|||
11
tools/build/feature/test-jvmti-cmlr.c
Normal file
11
tools/build/feature/test-jvmti-cmlr.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <jvmti.h>
|
||||
#include <jvmticmlr.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue