comparison make/linux/makefiles/vm.make @ 10405:f2110083203d

8005849: JEP 167: Event-Based JVM Tracing Reviewed-by: acorn, coleenp, sla Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author sla
date Mon, 10 Jun 2013 11:30:51 +0200
parents aabf54ccedb1
children 836a62f43af9 feae15578b2f
comparison
equal deleted inserted replaced
10404:d0add7016434 10405:f2110083203d
1 # 1 #
2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 2 # Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 # 4 #
5 # This code is free software; you can redistribute it and/or modify it 5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as 6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. 7 # published by the Free Software Foundation.
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 # 18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any 20 # or visit www.oracle.com if you need additional information or have any
21 # questions. 21 # questions.
22 # 22 #
23 # 23 #
24 24
25 # Rules to build JVM and related libraries, included from vm.make in the build 25 # Rules to build JVM and related libraries, included from vm.make in the build
26 # directory. 26 # directory.
27 27
50 50
51 # set VPATH so make knows where to look for source files 51 # set VPATH so make knows where to look for source files
52 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm 52 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
53 # The adfiles directory contains ad_<arch>.[ch]pp. 53 # The adfiles directory contains ad_<arch>.[ch]pp.
54 # The jvmtifiles directory contains jvmti*.[ch]pp 54 # The jvmtifiles directory contains jvmti*.[ch]pp
55 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles 55 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
56 VPATH += $(Src_Dirs_V:%=%:) 56 VPATH += $(Src_Dirs_V:%=%:)
57 57
58 # set INCLUDES for C preprocessor. 58 # set INCLUDES for C preprocessor.
59 Src_Dirs_I += $(GENERATED) 59 Src_Dirs_I += $(GENERATED)
60 # The order is important for the precompiled headers to work. 60 # The order is important for the precompiled headers to work.
70 else 70 else
71 SYMFLAG = 71 SYMFLAG =
72 endif 72 endif
73 endif 73 endif
74 74
75 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined 75 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
76 # in $(GAMMADIR)/make/defs.make 76 # in $(GAMMADIR)/make/defs.make
77 ifeq ($(HOTSPOT_BUILD_VERSION),) 77 ifeq ($(HOTSPOT_BUILD_VERSION),)
78 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\"" 78 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
79 else 79 else
80 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\"" 80 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
97 ${HS_LIB_ARCH} \ 97 ${HS_LIB_ARCH} \
98 ${VM_DISTRO} 98 ${VM_DISTRO}
99 99
100 # This is VERY important! The version define must only be supplied to vm_version.o 100 # This is VERY important! The version define must only be supplied to vm_version.o
101 # If not, ccache will not re-use the cache at all, since the version string might contain 101 # If not, ccache will not re-use the cache at all, since the version string might contain
102 # a time and date. 102 # a time and date.
103 CXXFLAGS/vm_version.o += ${JRE_VERSION} 103 CXXFLAGS/vm_version.o += ${JRE_VERSION}
104 104
105 CXXFLAGS/BYFILE = $(CXXFLAGS/$@) 105 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
106 106
107 # File specific flags 107 # File specific flags
108 CXXFLAGS += $(CXXFLAGS/BYFILE) 108 CXXFLAGS += $(CXXFLAGS/BYFILE)
109 109
110
111 ifndef JAVASE_EMBEDDED
112 ifneq (${ARCH},arm)
113 CFLAGS += -DINCLUDE_TRACE
114 endif
115 endif
116 110
117 # CFLAGS_WARN holds compiler options to suppress/enable warnings. 111 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
118 CFLAGS += $(CFLAGS_WARN/BYFILE) 112 CFLAGS += $(CFLAGS_WARN/BYFILE)
119 113
120 # Do not use C++ exception handling 114 # Do not use C++ exception handling
156 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm 150 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
157 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm 151 SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
158 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm 152 SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
159 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm 153 SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
160 154
161 ifndef JAVASE_EMBEDDED 155 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
162 ifneq (${ARCH},arm) 156 CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
163 SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \ 157
158 ifneq ($(INCLUDE_TRACE), false)
159 CORE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
164 find $(HS_ALT_SRC)/share/vm/jfr -type d; \ 160 find $(HS_ALT_SRC)/share/vm/jfr -type d; \
165 fi) 161 fi)
166 endif 162 endif
167 endif
168
169 CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
170 CORE_PATHS+=$(GENERATED)/jvmtifiles
171 163
172 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1) 164 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
173 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1 165 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
174 166
175 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto) 167 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
314 endif 306 endif
315 307
316 # With more recent Redhat releases (or the cutting edge version Fedora), if 308 # With more recent Redhat releases (or the cutting edge version Fedora), if
317 # SELinux is configured to be enabled, the runtime linker will fail to apply 309 # SELinux is configured to be enabled, the runtime linker will fail to apply
318 # the text relocation to libjvm.so considering that it is built as a non-PIC 310 # the text relocation to libjvm.so considering that it is built as a non-PIC
319 # DSO. To workaround that, we run chcon to libjvm.so after it is built. See 311 # DSO. To workaround that, we run chcon to libjvm.so after it is built. See
320 # details in bug 6538311. 312 # details in bug 6538311.
321 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) 313 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
322 $(QUIETLY) { \ 314 $(QUIETLY) { \
323 echo Linking vm...; \ 315 echo Linking vm...; \
324 $(LINK_LIB.CXX/PRE_HOOK) \ 316 $(LINK_LIB.CXX/PRE_HOOK) \