annotate make/solaris/makefiles/vm.make @ 807:d44bdab1c03d

6843694: G1: assert(index < _vs.committed_size(),"bad index"), g1BlockOffsetTable.inline.hpp:55 Summary: For heaps larger than 32Gb, the number of heap regions overflows the data type used to hold the region index in the SparsePRT structure. Changed the region indexes, card indexes, and RSet hash table buckets to ints and added some size overflow guarantees. Reviewed-by: ysr, tonyp
author johnc
date Thu, 11 Jun 2009 17:19:33 -0700
parents 4d20a3aaf1ab
children 167c2986d91b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
196
d1605aabd0a1 6719955: Update copyright year
xdono
parents: 110
diff changeset
2 # Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 #
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 #
a61af66fc99e Initial load
duke
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 #
a61af66fc99e Initial load
duke
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 #
a61af66fc99e Initial load
duke
parents:
diff changeset
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 # CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 # have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 # Rules to build JVM and related libraries, included from vm.make in the build
a61af66fc99e Initial load
duke
parents:
diff changeset
26 # directory.
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 # Common build rules.
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
29 MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
0
a61af66fc99e Initial load
duke
parents:
diff changeset
30 include $(MAKEFILES_DIR)/rules.make
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 default: build
a61af66fc99e Initial load
duke
parents:
diff changeset
33
a61af66fc99e Initial load
duke
parents:
diff changeset
34 #----------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
35 # Defs
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 GENERATED = ../generated
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 # read a generated file defining the set of .o's and the .o .h dependencies
a61af66fc99e Initial load
duke
parents:
diff changeset
40 include $(GENERATED)/Dependencies
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 # read machine-specific adjustments (%%% should do this via buildtree.make?)
a61af66fc99e Initial load
duke
parents:
diff changeset
43 include $(MAKEFILES_DIR)/$(BUILDARCH).make
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 # set VPATH so make knows where to look for source files
a61af66fc99e Initial load
duke
parents:
diff changeset
46 # Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
a61af66fc99e Initial load
duke
parents:
diff changeset
47 # The incls directory contains generated header file lists for inclusion.
a61af66fc99e Initial load
duke
parents:
diff changeset
48 # The adfiles directory contains ad_<arch>.[ch]pp.
a61af66fc99e Initial load
duke
parents:
diff changeset
49 # The jvmtifiles directory contains jvmti*.[ch]pp
a61af66fc99e Initial load
duke
parents:
diff changeset
50 Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls
a61af66fc99e Initial load
duke
parents:
diff changeset
51 VPATH += $(Src_Dirs_V:%=%:)
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 # set INCLUDES for C preprocessor
a61af66fc99e Initial load
duke
parents:
diff changeset
54 Src_Dirs_I = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)
a61af66fc99e Initial load
duke
parents:
diff changeset
55 INCLUDES += $(Src_Dirs_I:%=-I%)
a61af66fc99e Initial load
duke
parents:
diff changeset
56
a61af66fc99e Initial load
duke
parents:
diff changeset
57 ifeq (${VERSION}, debug)
a61af66fc99e Initial load
duke
parents:
diff changeset
58 SYMFLAG = -g
a61af66fc99e Initial load
duke
parents:
diff changeset
59 else
a61af66fc99e Initial load
duke
parents:
diff changeset
60 SYMFLAG =
a61af66fc99e Initial load
duke
parents:
diff changeset
61 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 # The following variables are defined in the generated flags.make file.
a61af66fc99e Initial load
duke
parents:
diff changeset
64 BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
a61af66fc99e Initial load
duke
parents:
diff changeset
65 JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
100
c7c777385a15 6667042: PrintAssembly option does not work without special plugin
jrose
parents: 0
diff changeset
66 HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
67 BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
a61af66fc99e Initial load
duke
parents:
diff changeset
68 BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
a61af66fc99e Initial load
duke
parents:
diff changeset
69 VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
a61af66fc99e Initial load
duke
parents:
diff changeset
70
a61af66fc99e Initial load
duke
parents:
diff changeset
71 CPPFLAGS = \
a61af66fc99e Initial load
duke
parents:
diff changeset
72 ${SYSDEFS} \
a61af66fc99e Initial load
duke
parents:
diff changeset
73 ${INCLUDES} \
a61af66fc99e Initial load
duke
parents:
diff changeset
74 ${BUILD_VERSION} \
a61af66fc99e Initial load
duke
parents:
diff changeset
75 ${BUILD_TARGET} \
a61af66fc99e Initial load
duke
parents:
diff changeset
76 ${BUILD_USER} \
100
c7c777385a15 6667042: PrintAssembly option does not work without special plugin
jrose
parents: 0
diff changeset
77 ${HS_LIB_ARCH} \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
78 ${JRE_VERSION} \
a61af66fc99e Initial load
duke
parents:
diff changeset
79 ${VM_DISTRO}
a61af66fc99e Initial load
duke
parents:
diff changeset
80
a61af66fc99e Initial load
duke
parents:
diff changeset
81 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
a61af66fc99e Initial load
duke
parents:
diff changeset
82 CFLAGS += $(CFLAGS_WARN)
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 # Do not use C++ exception handling
a61af66fc99e Initial load
duke
parents:
diff changeset
85 CFLAGS += $(CFLAGS/NOEX)
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 # Extra flags from gnumake's invocation or environment
a61af66fc99e Initial load
duke
parents:
diff changeset
88 CFLAGS += $(EXTRA_CFLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
89
a61af66fc99e Initial load
duke
parents:
diff changeset
90 # Math Library (libm.so), do not use -lm.
a61af66fc99e Initial load
duke
parents:
diff changeset
91 # There might be two versions of libm.so on the build system:
a61af66fc99e Initial load
duke
parents:
diff changeset
92 # libm.so.1 and libm.so.2, and we want libm.so.1.
a61af66fc99e Initial load
duke
parents:
diff changeset
93 # Depending on the Solaris release being used to build with,
a61af66fc99e Initial load
duke
parents:
diff changeset
94 # /usr/lib/libm.so could point at a libm.so.2, so we are
a61af66fc99e Initial load
duke
parents:
diff changeset
95 # explicit here so that the libjvm.so you have built will work on an
a61af66fc99e Initial load
duke
parents:
diff changeset
96 # older Solaris release that might not have libm.so.2.
a61af66fc99e Initial load
duke
parents:
diff changeset
97 # This is a critical factor in allowing builds on Solaris 10 or newer
a61af66fc99e Initial load
duke
parents:
diff changeset
98 # to run on Solaris 8 or 9.
a61af66fc99e Initial load
duke
parents:
diff changeset
99 #
a61af66fc99e Initial load
duke
parents:
diff changeset
100 LIBM=/usr/lib$(ISA_DIR)/libm.so.1
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 ifeq ("${Platform_compiler}", "sparcWorks")
a61af66fc99e Initial load
duke
parents:
diff changeset
103 # The whole megilla:
430
4d20a3aaf1ab 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents: 196
diff changeset
104 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
105 # Old Comment: List the libraries in the order the compiler was designed for
a61af66fc99e Initial load
duke
parents:
diff changeset
106 # Not sure what the 'designed for' comment is referring too above.
a61af66fc99e Initial load
duke
parents:
diff changeset
107 # The order may not be too significant anymore, but I have placed this
a61af66fc99e Initial load
duke
parents:
diff changeset
108 # older libm before libCrun, just to make sure it's found and used first.
a61af66fc99e Initial load
duke
parents:
diff changeset
109 LIBS += -lsocket -lsched -ldl $(LIBM) -lCrun -lthread -ldoor -lc
a61af66fc99e Initial load
duke
parents:
diff changeset
110 else
a61af66fc99e Initial load
duke
parents:
diff changeset
111 LIBS += -ldl -lthread -lsocket $(LIBM) -lsched -ldoor
a61af66fc99e Initial load
duke
parents:
diff changeset
112 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
113 else
a61af66fc99e Initial load
duke
parents:
diff changeset
114 LIBS += -lsocket -lsched -ldl $(LIBM) -lthread -lc
a61af66fc99e Initial load
duke
parents:
diff changeset
115 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
116
a61af66fc99e Initial load
duke
parents:
diff changeset
117 # By default, link the *.o into the library, not the executable.
a61af66fc99e Initial load
duke
parents:
diff changeset
118 LINK_INTO$(LINK_INTO) = LIBJVM
a61af66fc99e Initial load
duke
parents:
diff changeset
119
a61af66fc99e Initial load
duke
parents:
diff changeset
120 JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
a61af66fc99e Initial load
duke
parents:
diff changeset
121
a61af66fc99e Initial load
duke
parents:
diff changeset
122 #----------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
123 # jvm_db & dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
124 include $(MAKEFILES_DIR)/dtrace.make
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126 #----------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
127 # JVM
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 JVM = jvm$(G_SUFFIX)
a61af66fc99e Initial load
duke
parents:
diff changeset
130 LIBJVM = lib$(JVM).so
a61af66fc99e Initial load
duke
parents:
diff changeset
131
a61af66fc99e Initial load
duke
parents:
diff changeset
132 JVM_OBJ_FILES = $(Obj_Files) $(DTRACE_OBJS)
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
a61af66fc99e Initial load
duke
parents:
diff changeset
135
a61af66fc99e Initial load
duke
parents:
diff changeset
136 mapfile : $(MAPFILE) $(MAPFILE_DTRACE_OPT)
a61af66fc99e Initial load
duke
parents:
diff changeset
137 rm -f $@
a61af66fc99e Initial load
duke
parents:
diff changeset
138 cat $^ > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 mapfile_reorder : mapfile $(MAPFILE_DTRACE_OPT) $(REORDERFILE)
a61af66fc99e Initial load
duke
parents:
diff changeset
141 rm -f $@
a61af66fc99e Initial load
duke
parents:
diff changeset
142 cat $^ > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 ifeq ($(LINK_INTO),AOUT)
a61af66fc99e Initial load
duke
parents:
diff changeset
145 LIBJVM.o =
a61af66fc99e Initial load
duke
parents:
diff changeset
146 LIBJVM_MAPFILE =
a61af66fc99e Initial load
duke
parents:
diff changeset
147 LIBS_VM = $(LIBS)
a61af66fc99e Initial load
duke
parents:
diff changeset
148 else
a61af66fc99e Initial load
duke
parents:
diff changeset
149 LIBJVM.o = $(JVM_OBJ_FILES)
a61af66fc99e Initial load
duke
parents:
diff changeset
150 LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
a61af66fc99e Initial load
duke
parents:
diff changeset
151 LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
152 LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
a61af66fc99e Initial load
duke
parents:
diff changeset
153 ifndef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
154 LIBS_VM = $(LIBS)
a61af66fc99e Initial load
duke
parents:
diff changeset
155 else
a61af66fc99e Initial load
duke
parents:
diff changeset
156 # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
a61af66fc99e Initial load
duke
parents:
diff changeset
157 # get around library dependency and compatibility issues. Must use gcc not
a61af66fc99e Initial load
duke
parents:
diff changeset
158 # g++ to link.
a61af66fc99e Initial load
duke
parents:
diff changeset
159 LFLAGS_VM += $(STATIC_LIBGCC)
a61af66fc99e Initial load
duke
parents:
diff changeset
160 LIBS_VM += $(STATIC_STDCXX) $(LIBS)
a61af66fc99e Initial load
duke
parents:
diff changeset
161 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
162 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
163
a61af66fc99e Initial load
duke
parents:
diff changeset
164 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
165 LINK_VM = $(LINK_LIB.c)
a61af66fc99e Initial load
duke
parents:
diff changeset
166 else
a61af66fc99e Initial load
duke
parents:
diff changeset
167 LINK_VM = $(LINK_LIB.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
168 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
169 # making the library:
a61af66fc99e Initial load
duke
parents:
diff changeset
170 $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE)
a61af66fc99e Initial load
duke
parents:
diff changeset
171 $(QUIETLY) \
a61af66fc99e Initial load
duke
parents:
diff changeset
172 case "$(CFLAGS_BROWSE)" in \
a61af66fc99e Initial load
duke
parents:
diff changeset
173 -sbfast|-xsbfast) \
a61af66fc99e Initial load
duke
parents:
diff changeset
174 ;; \
a61af66fc99e Initial load
duke
parents:
diff changeset
175 *) \
a61af66fc99e Initial load
duke
parents:
diff changeset
176 echo Linking vm...; \
a61af66fc99e Initial load
duke
parents:
diff changeset
177 $(LINK_LIB.CC/PRE_HOOK) \
a61af66fc99e Initial load
duke
parents:
diff changeset
178 $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \
a61af66fc99e Initial load
duke
parents:
diff changeset
179 $(LINK_LIB.CC/POST_HOOK) \
a61af66fc99e Initial load
duke
parents:
diff changeset
180 rm -f $@.1; ln -s $@ $@.1; \
a61af66fc99e Initial load
duke
parents:
diff changeset
181 ;; \
a61af66fc99e Initial load
duke
parents:
diff changeset
182 esac
a61af66fc99e Initial load
duke
parents:
diff changeset
183
a61af66fc99e Initial load
duke
parents:
diff changeset
184 DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
a61af66fc99e Initial load
duke
parents:
diff changeset
185
a61af66fc99e Initial load
duke
parents:
diff changeset
186 install_jvm: $(LIBJVM)
a61af66fc99e Initial load
duke
parents:
diff changeset
187 @echo "Copying $(LIBJVM) to $(DEST_JVM)"
a61af66fc99e Initial load
duke
parents:
diff changeset
188 $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
a61af66fc99e Initial load
duke
parents:
diff changeset
189
a61af66fc99e Initial load
duke
parents:
diff changeset
190 #----------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
191 # Other files
a61af66fc99e Initial load
duke
parents:
diff changeset
192
a61af66fc99e Initial load
duke
parents:
diff changeset
193 # Gamma launcher
a61af66fc99e Initial load
duke
parents:
diff changeset
194 include $(MAKEFILES_DIR)/launcher.make
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 # Signal interposition library
a61af66fc99e Initial load
duke
parents:
diff changeset
197 include $(MAKEFILES_DIR)/jsig.make
a61af66fc99e Initial load
duke
parents:
diff changeset
198
a61af66fc99e Initial load
duke
parents:
diff changeset
199 # Serviceability agent
a61af66fc99e Initial load
duke
parents:
diff changeset
200 include $(MAKEFILES_DIR)/saproc.make
a61af66fc99e Initial load
duke
parents:
diff changeset
201
a61af66fc99e Initial load
duke
parents:
diff changeset
202 #----------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
203
a61af66fc99e Initial load
duke
parents:
diff changeset
204 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) checkAndBuildSA dtraceCheck
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 install: install_jvm install_jsig install_saproc
a61af66fc99e Initial load
duke
parents:
diff changeset
207
a61af66fc99e Initial load
duke
parents:
diff changeset
208 .PHONY: default build install install_jvm