26 ################################################################################ |
26 ################################################################################ |
27 # Gensrc support for dtrace. The files generated here are included by dtrace.hpp |
27 # Gensrc support for dtrace. The files generated here are included by dtrace.hpp |
28 |
28 |
29 ifeq ($(call check-jvm-feature, dtrace), true) |
29 ifeq ($(call check-jvm-feature, dtrace), true) |
30 |
30 |
31 ifeq ($(OPENJDK_TARGET_OS), solaris) |
31 ifeq ($(call isTargetOs, solaris), true) |
32 DTRACE_FLAGS := -64 |
32 DTRACE_FLAGS := -64 |
33 DTRACE_CPP_FLAGS := -D_LP64 |
33 DTRACE_CPP_FLAGS := -D_LP64 |
34 else ifeq ($(OPENJDK_TARGET_OS), macosx) |
34 else ifeq ($(call isTargetOs, macosx), true) |
35 DTRACE_CPP_FLAGS := -D_LP64 -x c |
35 DTRACE_CPP_FLAGS := -D_LP64 -x c |
36 else ifeq ($(OPENJDK_TARGET_OS), linux) |
36 else ifeq ($(call isTargetOs, linux), true) |
37 DTRACE_CPP_FLAGS := -x c |
37 DTRACE_CPP_FLAGS := -x c |
38 endif |
38 endif |
39 |
39 |
40 DTRACE_SOURCE_DIR := $(TOPDIR)/src/hotspot/os/posix/dtrace |
40 DTRACE_SOURCE_DIR := $(TOPDIR)/src/hotspot/os/posix/dtrace |
41 DTRACE_GENSRC_DIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/dtracefiles |
41 DTRACE_GENSRC_DIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/dtracefiles |
52 # Process all .d files in DTRACE_SOURCE_DIR. They are: |
52 # Process all .d files in DTRACE_SOURCE_DIR. They are: |
53 # hotspot_jni.d hotspot.d hs_private.d |
53 # hotspot_jni.d hotspot.d hs_private.d |
54 TARGETS += $(patsubst $(DTRACE_SOURCE_DIR)/%.d, \ |
54 TARGETS += $(patsubst $(DTRACE_SOURCE_DIR)/%.d, \ |
55 $(DTRACE_GENSRC_DIR)/%.h, $(wildcard $(DTRACE_SOURCE_DIR)/*.d)) |
55 $(DTRACE_GENSRC_DIR)/%.h, $(wildcard $(DTRACE_SOURCE_DIR)/*.d)) |
56 |
56 |
57 ifeq ($(OPENJDK_TARGET_OS), solaris) |
57 ifeq ($(call isTargetOs, solaris), true) |
58 ############################################################################ |
58 ############################################################################ |
59 # First we need to generate the dtraceGenOffsets tool. When run, this will |
59 # First we need to generate the dtraceGenOffsets tool. When run, this will |
60 # produce two header files and a C++ file. Note that generateJvmOffsets.cpp |
60 # produce two header files and a C++ file. Note that generateJvmOffsets.cpp |
61 # is using the same JVM_CFLAGS as libjvm.so. |
61 # is using the same JVM_CFLAGS as libjvm.so. |
62 |
62 |