annotate make/defs.make @ 2011:db2b0f8c1cef

6814943: getcpool001 catches more than one JvmtiThreadState problem Summary: Mark field volatile, use membars, and change access order to close race Reviewed-by: dcubed, dholmes
author kamg
date Tue, 11 Jan 2011 10:06:00 -0500
parents 126ea7725993
children b76d12f4ab2d
rev   line source
duke@0 1 #
trims@1472 2 # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation.
duke@0 8 #
duke@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 # accompanied this code).
duke@0 14 #
duke@0 15 # You should have received a copy of the GNU General Public License version
duke@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 #
trims@1472 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 20 # or visit www.oracle.com if you need additional information or have any
trims@1472 21 # questions.
duke@0 22 #
duke@0 23 #
duke@0 24
duke@0 25 # The common definitions for hotspot builds.
duke@0 26
duke@0 27 # Default to verbose build logs (show all compile lines):
duke@0 28 MAKE_VERBOSE=y
duke@0 29
duke@0 30 # Make macros for install files or preparing targets
duke@0 31 CD=cd
duke@0 32 CP=cp
duke@0 33 ECHO=echo
duke@0 34 GREP=grep
duke@0 35 MKDIR=mkdir
duke@0 36 MV=mv
duke@0 37 PWD=pwd
duke@0 38 RM=rm -f
duke@0 39 SED=sed
duke@0 40 TAR=tar
duke@0 41 ZIPEXE=zip
duke@0 42
duke@0 43 define install-file
duke@0 44 @$(MKDIR) -p $(@D)
duke@0 45 @$(RM) $@
duke@0 46 $(CP) $< $@
duke@0 47 endef
duke@0 48 define prep-target
duke@0 49 @$(MKDIR) -p $(@D)
duke@0 50 @$(RM) $@
duke@0 51 endef
duke@0 52
duke@0 53 # Directory paths and user name
duke@0 54 # Unless GAMMADIR is set on the command line, search upward from
duke@0 55 # the current directory for a parent directory containing "src/share/vm".
duke@0 56 # If that fails, look for $GAMMADIR in the environment.
duke@0 57 # When the tree of subdirs is built, this setting is stored in each flags.make.
duke@0 58 GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done)
duke@0 59 HS_SRC_DIR=$(GAMMADIR)/src
kamg@91 60 HS_MAKE_DIR=$(GAMMADIR)/make
duke@0 61 HS_BUILD_DIR=$(GAMMADIR)/build
duke@0 62
duke@0 63 ifeq ($(USER),)
duke@0 64 USER=$(USERNAME)
duke@0 65 endif
duke@0 66
duke@0 67 # hotspot version definitions
duke@0 68 include $(GAMMADIR)/make/hotspot_version
duke@0 69
duke@0 70 # Java versions needed
duke@0 71 ifeq ($(PREVIOUS_JDK_VERSION),)
duke@0 72 PREVIOUS_JDK_VERSION=$(JDK_PREVIOUS_VERSION)
duke@0 73 endif
duke@0 74 ifeq ($(JDK_MAJOR_VERSION),)
duke@0 75 JDK_MAJOR_VERSION=$(JDK_MAJOR_VER)
duke@0 76 endif
duke@0 77 ifeq ($(JDK_MINOR_VERSION),)
duke@0 78 JDK_MINOR_VERSION=$(JDK_MINOR_VER)
duke@0 79 endif
duke@0 80 ifeq ($(JDK_MICRO_VERSION),)
duke@0 81 JDK_MICRO_VERSION=$(JDK_MICRO_VER)
duke@0 82 endif
duke@0 83 ifeq ($(JDK_MKTG_VERSION),)
duke@0 84 JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
duke@0 85 endif
duke@0 86 ifeq ($(JDK_VERSION),)
duke@0 87 JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
duke@0 88 endif
duke@0 89 ifeq ($(FULL_VERSION),)
duke@0 90 FULL_VERSION="$(JDK_VERSION)"
duke@0 91 endif
duke@0 92
duke@0 93 # FULL_VERSION is only used to define JRE_RELEASE_VERSION which is used
duke@0 94 # as JRE version in VM -Xinternalversion output.
duke@0 95 ifndef JRE_RELEASE_VERSION
duke@0 96 JRE_RELEASE_VERSION=$(FULL_VERSION)
duke@0 97 endif
duke@0 98
duke@0 99 ifndef HOTSPOT_RELEASE_VERSION
duke@0 100 HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
duke@0 101 endif
duke@0 102
duke@0 103 ifdef HOTSPOT_BUILD_VERSION
ohair@1884 104 # specified in command line
duke@0 105 else
ohair@1884 106 ifdef COOKED_BUILD_NUMBER
ohair@1884 107 # JRE build
ohair@1884 108 HOTSPOT_BUILD_VERSION=
duke@0 109 else
ohair@1884 110 ifdef USER_RELEASE_SUFFIX
ohair@1884 111 HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
duke@0 112 else
duke@0 113 HOTSPOT_BUILD_VERSION=internal
duke@0 114 endif
duke@0 115 endif
duke@0 116 endif
duke@0 117
duke@0 118 # Windows should have OS predefined
duke@0 119 ifeq ($(OS),)
duke@0 120 OS := $(shell uname -s)
duke@0 121 HOST := $(shell uname -n)
duke@0 122 endif
duke@0 123
duke@0 124 # If not SunOS and not Linux, assume Windows
duke@0 125 ifneq ($(OS), Linux)
duke@0 126 ifneq ($(OS), SunOS)
duke@0 127 OSNAME=windows
duke@0 128 else
duke@0 129 OSNAME=solaris
duke@0 130 endif
duke@0 131 else
duke@0 132 OSNAME=linux
duke@0 133 endif
duke@0 134
duke@0 135 # Determinations of default make arguments and platform specific settings
duke@0 136 MAKE_ARGS=
duke@0 137
duke@0 138 # ARCH_DATA_MODEL==64 is equivalent to LP64=1
duke@0 139 ifeq ($(ARCH_DATA_MODEL), 64)
duke@0 140 ifndef LP64
duke@0 141 LP64 := 1
duke@0 142 endif
duke@0 143 endif
duke@0 144
duke@0 145 # Defaults set for product build
duke@0 146 EXPORT_SUBDIR=
duke@0 147
duke@0 148 # Change default /java path if requested
duke@0 149 ifneq ($(ALT_SLASH_JAVA),)
duke@0 150 SLASH_JAVA=$(ALT_SLASH_JAVA)
duke@0 151 endif
duke@0 152
duke@0 153 # Default OUTPUTDIR
duke@0 154 OUTPUTDIR=$(HS_BUILD_DIR)/$(OSNAME)
duke@0 155 ifneq ($(ALT_OUTPUTDIR),)
duke@0 156 OUTPUTDIR=$(ALT_OUTPUTDIR)
duke@0 157 endif
duke@0 158
duke@0 159 # Find latest promoted JDK area
duke@0 160 JDK_IMPORT_PATH=$(SLASH_JAVA)/re/j2se/$(JDK_VERSION)/promoted/latest/binaries/$(PLATFORM)
duke@0 161 ifneq ($(ALT_JDK_IMPORT_PATH),)
duke@0 162 JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH)
duke@0 163 endif
duke@0 164
duke@0 165 # Find JDK used for javac compiles
duke@0 166 BOOTDIR=$(SLASH_JAVA)/re/j2se/$(PREVIOUS_JDK_VERSION)/latest/binaries/$(PLATFORM)
duke@0 167 ifneq ($(ALT_BOOTDIR),)
duke@0 168 BOOTDIR=$(ALT_BOOTDIR)
duke@0 169 endif
duke@0 170
duke@0 171 # The platform dependent defs.make defines platform specific variable such
duke@0 172 # as ARCH, EXPORT_LIST etc. We must place the include here after BOOTDIR is defined.
kamg@91 173 include $(GAMMADIR)/make/$(OSNAME)/makefiles/defs.make
duke@0 174
duke@0 175 # We are trying to put platform specific defintions
kamg@91 176 # files to make/$(OSNAME)/makefiles dictory. However
duke@0 177 # some definitions are common for both linux and solaris,
duke@0 178 # so we put them here.
duke@0 179 ifneq ($(OSNAME),windows)
kamg@91 180 ABS_OUTPUTDIR := $(shell mkdir -p $(OUTPUTDIR); $(CD) $(OUTPUTDIR); $(PWD))
duke@0 181 ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR); $(PWD))
duke@0 182 ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR); $(PWD))
kamg@91 183 ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME); $(PWD))/Makefile
duke@0 184
duke@0 185 # uname, HotSpot source directory, build directory and JDK use different names
duke@0 186 # for CPU architectures.
duke@0 187 # ARCH - uname output
duke@0 188 # SRCARCH - where to find HotSpot cpu and os_cpu source files
duke@0 189 # BUILDARCH - build directory
duke@0 190 # LIBARCH - directory name in JDK/JRE
duke@0 191
duke@0 192 # Use uname output for SRCARCH, but deal with platform differences. If ARCH
duke@0 193 # is not explicitly listed below, it is treated as x86.
bobv@1601 194 SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH)))
duke@0 195 ARCH/ = x86
duke@0 196 ARCH/sparc = sparc
duke@0 197 ARCH/sparc64= sparc
duke@0 198 ARCH/ia64 = ia64
duke@0 199 ARCH/amd64 = x86
duke@0 200 ARCH/x86_64 = x86
bobv@1601 201 ARCH/ppc64 = ppc
bobv@1601 202 ARCH/ppc = ppc
bobv@1601 203 ARCH/arm = arm
never@1010 204 ARCH/zero = zero
duke@0 205
duke@0 206 # BUILDARCH is usually the same as SRCARCH, except for sparcv9
duke@0 207 BUILDARCH = $(SRCARCH)
duke@0 208 ifeq ($(BUILDARCH), x86)
duke@0 209 ifdef LP64
duke@0 210 BUILDARCH = amd64
duke@0 211 else
duke@0 212 BUILDARCH = i486
duke@0 213 endif
duke@0 214 endif
duke@0 215 ifeq ($(BUILDARCH), sparc)
duke@0 216 ifdef LP64
duke@0 217 BUILDARCH = sparcv9
duke@0 218 endif
duke@0 219 endif
duke@0 220
duke@0 221 # LIBARCH is 1:1 mapping from BUILDARCH
duke@0 222 LIBARCH = $(LIBARCH/$(BUILDARCH))
duke@0 223 LIBARCH/i486 = i386
duke@0 224 LIBARCH/amd64 = amd64
duke@0 225 LIBARCH/sparc = sparc
duke@0 226 LIBARCH/sparcv9 = sparcv9
duke@0 227 LIBARCH/ia64 = ia64
bobv@1601 228 LIBARCH/ppc64 = ppc
bobv@1601 229 LIBARCH/ppc = ppc
bobv@1601 230 LIBARCH/arm = arm
never@1010 231 LIBARCH/zero = $(ZERO_LIBARCH)
duke@0 232
never@1010 233 LP64_ARCH = sparcv9 amd64 ia64 zero
duke@0 234 endif
duke@0 235
duke@0 236 # Required make macro settings for all platforms
duke@0 237 MAKE_ARGS += JAVA_HOME=$(ABS_BOOTDIR)
xlu@228 238 MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
duke@0 239 MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
duke@0 240 MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
duke@0 241 MAKE_ARGS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION)
duke@0 242 MAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
duke@0 243
duke@0 244 # Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
duke@0 245 # to overwrite the default definition since OS specific Makefile also
duke@0 246 # includes this make/defs.make file.
duke@0 247 MAKE_ARGS += HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION)
duke@0 248
duke@0 249 # Select name of export directory
duke@0 250 EXPORT_PATH=$(OUTPUTDIR)/export-$(PLATFORM)$(EXPORT_SUBDIR)
duke@0 251 ifneq ($(ALT_EXPORT_PATH),)
duke@0 252 EXPORT_PATH=$(ALT_EXPORT_PATH)
duke@0 253 endif
duke@0 254
duke@0 255 # Default jdk image if one is created for you with create_jdk
duke@0 256 JDK_IMAGE_DIR=$(OUTPUTDIR)/jdk-$(PLATFORM)
duke@0 257
duke@0 258 # Various export sub directories
duke@0 259 EXPORT_INCLUDE_DIR = $(EXPORT_PATH)/include
duke@0 260 EXPORT_DOCS_DIR = $(EXPORT_PATH)/docs
duke@0 261 EXPORT_LIB_DIR = $(EXPORT_PATH)/lib
duke@0 262 EXPORT_JRE_DIR = $(EXPORT_PATH)/jre
duke@0 263 EXPORT_JRE_BIN_DIR = $(EXPORT_JRE_DIR)/bin
duke@0 264 EXPORT_JRE_LIB_DIR = $(EXPORT_JRE_DIR)/lib
duke@0 265 EXPORT_JRE_LIB_ARCH_DIR = $(EXPORT_JRE_LIB_DIR)/$(LIBARCH)
duke@0 266
duke@0 267 # Common export list of files
duke@0 268 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmti.h
dcubed@1184 269 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmticmlr.h
duke@0 270 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h
duke@0 271 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h
duke@0 272 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h