diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-11-02 09:35:48 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-11-14 10:40:32 -0500 |
commit | 285932a25879602407f207e862bc5b8416711f42 (patch) | |
tree | dd1dba610981bd32df832fce92e9edcbcbff582c /tools/build | |
parent | 2ec8107d8e0d1d285b2bbf1999e7f4e46b6b535b (diff) |
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 <jolsa@kernel.org>
Tested-by: Stephane Eranian <eranian@google.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: William Cohen <wcohen@redhat.com>
Link: http://lkml.kernel.org/r/1478093749-5602-3-git-send-email-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 | 6 | ||||
-rw-r--r-- | tools/build/feature/test-jvmti.c | 13 |
2 files changed, 18 insertions, 1 deletions
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= \ | |||
47 | test-bpf.bin \ | 47 | test-bpf.bin \ |
48 | test-get_cpuid.bin \ | 48 | test-get_cpuid.bin \ |
49 | test-sdt.bin \ | 49 | test-sdt.bin \ |
50 | test-cxx.bin | 50 | test-cxx.bin \ |
51 | test-jvmti.bin | ||
51 | 52 | ||
52 | FILES := $(addprefix $(OUTPUT),$(FILES)) | 53 | FILES := $(addprefix $(OUTPUT),$(FILES)) |
53 | 54 | ||
@@ -225,6 +226,9 @@ $(OUTPUT)test-sdt.bin: | |||
225 | $(OUTPUT)test-cxx.bin: | 226 | $(OUTPUT)test-cxx.bin: |
226 | $(BUILDXX) -std=gnu++11 | 227 | $(BUILDXX) -std=gnu++11 |
227 | 228 | ||
229 | $(OUTPUT)test-jvmti.bin: | ||
230 | $(BUILD) | ||
231 | |||
228 | -include $(OUTPUT)*.d | 232 | -include $(OUTPUT)*.d |
229 | 233 | ||
230 | ############################### | 234 | ############################### |
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 @@ | |||
1 | #include <jvmti.h> | ||
2 | #include <jvmticmlr.h> | ||
3 | |||
4 | int main(void) | ||
5 | { | ||
6 | JavaVM jvm __attribute__((unused)); | ||
7 | jvmtiEventCallbacks cb __attribute__((unused)); | ||
8 | jvmtiCapabilities caps __attribute__((unused)); | ||
9 | jvmtiJlocationFormat format __attribute__((unused)); | ||
10 | jvmtiEnv jvmti __attribute__((unused)); | ||
11 | |||
12 | return 0; | ||
13 | } | ||