提交 fbd3505a 编写于 作者: D duke

Merge

......@@ -85,3 +85,4 @@ f8be576feefce0c6695f188ef97ec16b73ad9cfd jdk7-b104
140fdef4ddf52244013b6157dc542cd9f677bb6f jdk7-b108
81dfc728d7bb7e1fff4a4dc6d0f7cea5a3315667 jdk7-b109
2a02d4a6955c7c078aee9a604cb3be409800d82c jdk7-b110
9702d6fef68e17533ee7fcf5923b11ead3e912ce jdk7-b111
......@@ -85,3 +85,4 @@ a56d734a1e970e1a21a8f4feb13053e9a33674c7 jdk7-b100
8d810527b499a67153365db74421a03c12b46f35 jdk7-b108
c3dd858e09b20206459d9e7b0ead99d27ab00eab jdk7-b109
0e1f80fda2271f53d4bbb59ec3f301dfbcef6a0a jdk7-b110
640fa4d4e2ad4c2d7e4815c955026740d8c52b7a jdk7-b111
......@@ -61,7 +61,6 @@ ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
CLASSES_DIR = $(BUILD_DIR)/classes
GENSRC_DIR = $(BUILD_DIR)/gensrc
BIN_DIR = $(DIST_DIR)/bin
LIB_DIR = $(DIST_DIR)/lib
#-----
......
......@@ -28,306 +28,10 @@
# targeted to Linux. Should not contain any rules.
#
# Warning: the following variables are overriden by Defs.gmk. Set
# values will be silently ignored:
# CFLAGS (set $(OTHER_CFLAGS) instead)
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
# LDFLAGS (set $(OTHER_LDFAGS) instead)
# LDLIBS (set $(EXTRA_LIBS) instead)
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
# Get shared JDK settings
include $(BUILDDIR)/common/shared/Defs.gmk
# Part of INCREMENTAL_BUILD mechanism.
# Compiler emits things like: path/file.o: file.h
# We want something like: relative_path/file.o relative_path/file.d: file.h
CC_DEPEND = -MM
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
ifndef PLATFORM_SRC
PLATFORM_SRC = $(TOPDIR)/src/solaris
endif # PLATFORM_SRC
# platform specific include files
PLATFORM_INCLUDE_NAME = $(PLATFORM)
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# suffix used for make dependencies files.
DEPEND_SUFFIX = d
# The suffix applied to the library name for FDLIBM
FDDLIBM_SUFFIX = a
# The suffix applied to scripts (.bat for windows, nothing for unix)
SCRIPT_SUFFIX =
# CC compiler object code output directive flag value
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
#
# Default HPI libraries. Build will build only native, unless
# overriden at the make command line. This makes it convenient for
# people doing, say, a pthreads port -- they can create a posix
# directory here, and say "gnumake HPIS=posix" at the top
# level.
#
HPIS = native
#
# Default optimization
#
CC_HIGHEST_OPT = -O3
CC_HIGHER_OPT = -O3
CC_LOWER_OPT = -O2
CC_NO_OPT =
ifeq ($(PRODUCT), java)
_OPT = $(CC_HIGHER_OPT)
else
_OPT = $(CC_LOWER_OPT)
CPPFLAGS_DBG += -DLOGGING
endif
# For all platforms, do not omit the frame pointer register usage.
# We need this frame pointer to make it easy to walk the stacks.
# This should be the default on X86, but ia64 and amd64 may not have this
# as the default.
CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9
LDFLAGS_COMMON_sparc += -m32 -mcpu=v9
ifeq ($(ZERO_BUILD), true)
CFLAGS_REQUIRED = $(ZERO_ARCHFLAG)
ifeq ($(ZERO_ENDIANNESS), little)
CFLAGS_REQUIRED += -D_LITTLE_ENDIAN
endif
LDFLAGS_COMMON += $(ZERO_ARCHFLAG)
else
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
endif
# Add in platform specific optimizations for all opt levels
CC_HIGHEST_OPT += $(_OPT_$(ARCH))
CC_HIGHER_OPT += $(_OPT_$(ARCH))
CC_LOWER_OPT += $(_OPT_$(ARCH))
# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
ifdef NO_OPTIMIZATIONS
CC_HIGHEST_OPT = $(CC_NO_OPT)
CC_HIGHER_OPT = $(CC_NO_OPT)
CC_LOWER_OPT = $(CC_NO_OPT)
endif
#
# Selection of warning messages
#
GCC_INHIBIT = -Wno-unused -Wno-parentheses
GCC_STYLE =
GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
#
# Treat compiler warnings as errors, if warnings not allowed
#
ifeq ($(COMPILER_WARNINGS_FATAL),true)
GCC_WARNINGS += -Werror
endif
#
# Misc compiler options
#
ifeq ($(ARCH),ppc)
CFLAGS_COMMON = -fsigned-char
else # ARCH
CFLAGS_COMMON = -fno-strict-aliasing
endif # ARCH
PIC_CODE_LARGE = -fPIC
PIC_CODE_SMALL = -fpic
GLOBAL_KPIC = $(PIC_CODE_LARGE)
ifeq ($(ARCH), amd64)
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS) -pipe
else
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
endif
# Linux 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
DEBUG_FLAG = -g
ifeq ($(FASTDEBUG), true)
ifeq ($(ARCH_DATA_MODEL), 64)
DEBUG_FLAG = -g1
endif
endif
CFLAGS_OPT = $(POPT)
CFLAGS_DBG = $(DEBUG_FLAG)
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
CXXFLAGS_OPT = $(POPT)
CXXFLAGS_DBG = $(DEBUG_FLAG)
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
ifeq ($(FASTDEBUG), true)
CFLAGS_DBG += $(CC_LOWER_OPT)
CXXFLAGS_DBG += $(CC_LOWER_OPT)
endif
CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
ifneq ($(ARCH),alpha)
CPP_ARCH_FLAGS += -D$(ARCH)
else
CPP_ARCH_FLAGS += -D_$(ARCH)_
endif
CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
ifeq ($(ARCH_DATA_MODEL), 64)
CPPFLAGS_COMMON += -D_LP64=1
endif
CPPFLAGS_OPT =
CPPFLAGS_DBG = -DDEBUG
ifdef LIBRARY
# Libraries need to locate other libraries at runtime, and you can tell
# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
# buried inside the .so. The $ORIGIN says to look relative to where
# the library itself is and it can be followed with relative paths from
# that. By default we always look in $ORIGIN, optionally we add relative
# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
# On Linux we add a flag -z origin, not sure if this is necessary, but
# doesn't seem to hurt.
# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
# Try: 'readelf -d lib*.so' to see these settings in a library.
#
LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN
LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%)
endif
EXTRA_LIBS += -lc
LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
#
# -L paths for finding and -ljava
#
LDFLAGS_OPT = -Xlinker -O1
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
#
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
# statically link libgcc but will print a warning with the flag. We don't
# want the warning, so check gcc version first.
#
CC_VER_MAJOR := $(shell $(CC) -dumpversion | $(SED) 's/egcs-//' | $(CUT) -d'.' -f1)
ifeq ("$(CC_VER_MAJOR)", "3")
OTHER_LDFLAGS += -static-libgcc
endif
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
# (See Rules.gmk) The gcc 5 compiler might have an option for this?
AUTOMATIC_PCH_OPTION =
#
# Post Processing of libraries/executables
#
ifeq ($(VARIANT), OPT)
ifneq ($(NO_STRIP), true)
# Debug 'strip -g' leaves local function Elf symbols (better stack traces)
POST_STRIP_PROCESS = $(STRIP) -g
endif
endif
#
# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
#
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
#
# Support for Quantify.
#
ifdef QUANTIFY
QUANTIFY_CMD = quantify
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
endif
#
# Path and option to link against the VM, if you have to. Note that
# there are libraries that link against only -ljava, but they do get
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
# the library itself should not.
#
VM_NAME = server
JVMLIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH)/$(VM_NAME) -ljvm
JAVALIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH) -ljava $(JVMLIB)
#
# We want to privatize JVM symbols on Solaris. This is so the user can
# write a function called FindClass and this should not override the
# FindClass that is inside the JVM. At this point in time we are not
# concerned with other JNI libraries because we hope that there will
# not be as many clashes there.
#
PRIVATIZE_JVM_SYMBOLS = false
USE_PTHREADS = true
override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME
override AWT_RUNPATH =
override HAVE_ALTZONE = false
override HAVE_FILIOH = false
override HAVE_GETHRTIME = false
override HAVE_GETHRVTIME = false
override HAVE_SIGIGNORE = true
override LEX_LIBRARY = -lfl
ifeq ($(STATIC_CXX),true)
override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
else
override LIBCXX = -lstdc++
endif
override LIBPOSIX4 =
override LIBSOCKET =
override LIBTHREAD =
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
override OPENWIN_HOME = /usr/X11R6
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
override OPENWIN_LIB = $(OPENWIN_HOME)/lib
endif
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
override SUN_CMM_SUBDIR =
override THREADS_FLAG = native
override USE_GNU_M4 = true
override USING_GNU_TAR = true
override WRITE_LIBVERSION = false
# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
# resulting resolved absolute name of the executable in the environment
# variable EXECNAME. That executable name is then used that to locate the
# installation area.
override USE_EXECNAME = true
# If your platform has DPS, it will have Type1 fonts too, in which case
# it is best to enable DPS support until such time as 2D's rasteriser
# can fully handle Type1 fonts in all cases. Default is "yes".
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
# DPS (Displayable PostScript) is available on Solaris machines
HAVE_DPS = no
#
# Japanese manpages
#
JA_SOURCE_ENCODING = eucJP
JA_TARGET_ENCODINGS = eucJP
此差异已折叠。
......@@ -31,363 +31,7 @@
# Get shared JDK settings
include $(BUILDDIR)/common/shared/Defs.gmk
# CC compiler object code output directive flag value
CC_OBJECT_OUTPUT_FLAG = -Fo
CC_PROGRAM_OUTPUT_FLAG = -Fe
# The suffix applied to the library name for FDLIBM
FDDLIBM_SUFFIX = lib
# The suffix applied to scripts (.bat for windows, nothing for unix)
SCRIPT_SUFFIX = .bat
HPIS = windows
# LIB_LOCATION, which for windows identifies where .exe files go, may be
# set by each GNUmakefile. The default is BINDIR.
ifndef LIB_LOCATION
LIB_LOCATION = $(BINDIR)
endif # LIB_LOCATION
ifndef PLATFORM_SRC
PLATFORM_SRC = $(TOPDIR)/src/windows
endif # PLATFORM_SRC
# for backwards compatability, the old "win32" is used here instead of
# the more proper "windows"
PLATFORM_INCLUDE_NAME = win32
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# The following DLL's are considered MS runtime libraries and should
# not to be REBASEd, see deploy/make/common/Release.gmk.
# msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
MS_RUNTIME_LIBRARIES = msvcrt.dll
MSVCRNN_DLL =
ifeq ($(ARCH_DATA_MODEL), 32)
ifeq ($(COMPILER_VERSION), VS2003)
MSVCRNN_DLL = msvcr71.dll
MSVCPNN_DLL = msvcp71.dll
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif
ifeq ($(COMPILER_VERSION), VS2005)
MSVCRNN_DLL = msvcr80.dll
MSVCPNN_DLL = msvcp80.dll
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif
ifeq ($(COMPILER_VERSION), VS2008)
MSVCRNN_DLL = msvcr90.dll
MSVCPNN_DLL = msvcp90.dll
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif
ifeq ($(COMPILER_VERSION), VS2010)
MSVCRNN_DLL = msvcr100.dll
MSVCPNN_DLL = msvcp100.dll
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif
endif
# C Compiler flag definitions
#
# Default optimization
#
ifeq ($(CC_VERSION),msvc)
# Visual Studio .NET 2003 or VS2003 compiler option definitions:
# -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy)
# -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
# -Ox Full optimization (use -O2) (-Og -Oi -Ot -Oy -Ob2)
# (Removed in Visual Studio 2005 or VS2005)
# -Ob2 More aggressive inlining
# -Og Global optimizations
# -Oi Replace some functions with intrinsic or special forms
# -Op Improve floating point calculations (disables some optimizations)
# (Replaced with -fp:precise in VS2005, /Op is default now)
# -Os Favor small code
# -Ot Favor faster code
# -Oy Frame pointer omission
# -GB Optimize for pentium (old VC6 option?)
# -G6 VS2003 version of -GB?
# -GF Pool strings in read-only memory
# -Gf Pool strings in read-write memory (the default)
# -Gs Controls stack probess
# -GS Adds buffer overflow checks on stacks
# (Default in VS2005)
# -GX Enables exception handling
# (Replaced with /EHsc in VS2005)
# -Gy Function level linking only
#
# NOTE: With VC6, -Ox included -Gs.
# NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2.
# NOTE: With VC6, -O1 and -O2 used -Gf, not -GF.
#
ifeq ($(COMPILER_VERSION), VC6)
# VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built)
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
AUTOMATIC_PCH_OPTION =
GX_OPTION = -GX
ifeq ($(ARCH_DATA_MODEL), 32)
CC_HIGHEST_OPT = -Ox -Gy -Os -GB
CC_HIGHER_OPT = -Ox -Gy -Os -GB
CC_LOWER_OPT = -Ox -Gy -Os -GB
else
CC_HIGHEST_OPT = -Ox -Gy -Op
CC_HIGHER_OPT = -Ox -Gy -Op
CC_LOWER_OPT = -Ox -Gy -Op
endif
endif
ifeq ($(COMPILER_VERSION), VS2003)
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
AUTOMATIC_PCH_OPTION = -YX
# Also known as VC7 compiler
GX_OPTION = -GX
ifeq ($(ARCH_DATA_MODEL), 32)
# Lowered opt level to try and reduce footprint, dll size especially.
# Was: CC_HIGHEST_OPT = -O2 -G6
# Was: CC_HIGHER_OPT = -O2
CC_HIGHEST_OPT = -O2
CC_HIGHER_OPT = -O1
CC_LOWER_OPT = -O1
else
CC_HIGHEST_OPT = -O2 -Op
CC_HIGHER_OPT = -O2 -Op
CC_LOWER_OPT = -O1 -Op
endif
endif
ifeq ($(COMPILER_VERSION), VS2005)
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
AUTOMATIC_PCH_OPTION =
# VS2005 compiler, only with Platform SDK right now?
GX_OPTION = -EHsc
ifeq ($(ARCH_DATA_MODEL), 32)
CC_HIGHEST_OPT = -O2
CC_HIGHER_OPT = -O1
CC_LOWER_OPT = -O1
else
CC_HIGHEST_OPT = -O2
CC_HIGHER_OPT = -O1
CC_LOWER_OPT = -O1
endif
endif
ifeq ($(COMPILER_VERSION), VS2008)
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
AUTOMATIC_PCH_OPTION =
GX_OPTION = -EHsc
ifeq ($(ARCH_DATA_MODEL), 32)
CC_HIGHEST_OPT = -O2
CC_HIGHER_OPT = -O1
CC_LOWER_OPT = -O1
else
CC_HIGHEST_OPT = -O2
CC_HIGHER_OPT = -O1
CC_LOWER_OPT = -O1
endif
endif
ifeq ($(COMPILER_VERSION), VS2010)
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
AUTOMATIC_PCH_OPTION =
GX_OPTION = -EHsc
ifeq ($(ARCH_DATA_MODEL), 32)
CC_HIGHEST_OPT = -O2
CC_HIGHER_OPT = -O1
CC_LOWER_OPT = -O1
else
CC_HIGHEST_OPT = -O2
CC_HIGHER_OPT = -O1
CC_LOWER_OPT = -O1
endif
endif
CC_NO_OPT = -Od
else # CC_VERSION
# GCC not supported, but left for historical reference...
CC_HIGHEST_OPT = -O3
CC_HIGHER_OPT = -O2
CC_LOWER_OPT = -O2
CC_NO_OPT =
endif
# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
ifdef NO_OPTIMIZATIONS
CC_HIGHEST_OPT = $(CC_NO_OPT)
CC_HIGHER_OPT = $(CC_NO_OPT)
CC_LOWER_OPT = $(CC_NO_OPT)
endif
ifeq ($(PRODUCT), java)
_OPT = $(CC_HIGHER_OPT)
else
_OPT = $(CC_LOWER_OPT)
endif
# Select the runtime support library carefully, need to be consistent
#
# VS2003 compiler option definitions:
# -MD Use dynamic multi-threaded runtime library
# -MDd Use debug version (don't use, doesn't mix with -MD DLL's)
# -MT Use static multi-threaded runtime library (-ML is going away)
# -MTd Use static debug version (better than -MDd, no runtime issues)
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
#
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
#
ifeq ($(MS_RUNTIME_STATIC),true)
MS_RUNTIME_OPTION=-MT
else
MS_RUNTIME_OPTION=-MD
endif
# The _DEBUG macro option (changes things like malloc to use debug version)
MS_RUNTIME_DEBUG_OPTION=
MS_RC_DEBUG_OPTION=
# Externally set environment variable can force any build to use the debug vers
ifeq ($(MFC_DEBUG), true)
ifeq ($(MS_RUNTIME_STATIC),true)
MS_RUNTIME_OPTION=-MTd
else
# This MS debugging flag forces a dependence on the debug
# version of the runtime library (MSVCRTD.DLL), as does -MDd.
# We cannot re-distribute this debug runtime.
MS_RUNTIME_OPTION=-MDd
endif
MS_RUNTIME_DEBUG_OPTION= -D_DEBUG
MS_RC_DEBUG_OPTION= -d _DEBUG
endif
# Always add _STATIC_CPPLIB definition
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
ifeq ($(CC_VERSION),msvc)
# VS2003 compiler option definitions:
# -Zi Cause *.pdb file to be created, full debug information
# -Z7 Full debug inside the .obj, no .pdb
# -Zd Basic debug, no local variables? In the .obj
# -Zl Don't add runtime library name to obj file?
# -Od Turns off optimization and speeds compilation
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
# -nologo Don't print out startup message
# /D _STATIC_CPPLIB
# Use static link for the C++ runtime (so msvcpnn.dll not needed)
#
CFLAGS_COMMON += -Zi -nologo
CFLAGS_OPT = $(POPT)
CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION)
# Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type
# by default. However, we expect the wchar_t to be a typedef to the
# unsigned short data type. The -Zc:wchar_t- option restores the old
# behavior (as seen in VS2003) to avoid massive code modifications.
# When/if our code will be "C/C++ Standard"-compliant (at least in the area
# of handling the wchar_t type), the option won't be necessary.
ifeq ($(ARCH_DATA_MODEL), 32)
CFLAGS_VS2005 += -Zc:wchar_t-
else
# The 64bit Platform SDK we use (April 2005) doesn't like this option
ifneq ($(CC_VER), 14.00.40310.41)
CFLAGS_VS2005 += -Zc:wchar_t-
endif
endif
# All builds get the same runtime setting
CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
LDEBUG = /debug
ifeq ($(VTUNE_SUPPORT), true)
OTHER_CFLAGS = -Z7 -Ox
LDEBUG += /pdb:NONE
endif
# The new Platform SDK and VS2005 has /GS as a default and requires
# bufferoverflowU.lib on the link command line, otherwise
# we get missing __security_check_cookie externals at link time.
BUFFEROVERFLOWLIB = bufferoverflowU.lib
# Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
BASELFLAGS = -nologo /opt:REF /incremental:no
LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
endif
#
# Preprocessor macro definitions
#
CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
ifeq ($(ARCH), amd64)
CPPFLAGS_COMMON += -D_AMD64_ -Damd64
else
CPPFLAGS_COMMON += -DWIN32 -D_X86_ -Dx86
endif
CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN
#
# Output options (use specific filenames to avoid parallel compile errors)
#
CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
#
# Add warnings and extra on 64bit issues
#
ifeq ($(ARCH_DATA_MODEL), 64)
CFLAGS_COMMON += -Wp64
endif
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
#
# Treat compiler warnings as errors, if requested
#
ifeq ($(COMPILER_WARNINGS_FATAL),true)
CFLAGS_COMMON += -WX
endif
CPPFLAGS_OPT =
CPPFLAGS_DBG = -DDEBUG -DLOGGING
CXXFLAGS_COMMON = $(CFLAGS_COMMON)
CXXFLAGS_OPT = $(CFLAGS_OPT)
CXXFLAGS_DBG = $(CFLAGS_DBG)
ifneq ($(LIBRARY),fdlibm)
EXTRA_LIBS += advapi32.lib
endif
#
# Path and option to link against the VM, if you have to.
#
JVMLIB = $(BOOTDIR)/lib/jvm.lib
JAVALIB =
ifeq ($(CC_VERSION), msvc)
CC_DEPEND = -FD
CC_DEPEND_FILTER =
else # CC_VERSION
# not supported, but left for historical reference...
CC_DEPEND = -MM
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
endif # CC_VERSION
LIBRARY_SUFFIX = dll
LIB_SUFFIX = lib
# Settings for the VERSIONINFO tap on windows.
VERSIONINFO_RESOURCE = $(TOPDIR)/src/windows/resource/version.rc
RC_FLAGS = /l 0x409 /r
ifeq ($(VARIANT), OPT)
RC_FLAGS += -d NDEBUG
else
RC_FLAGS += $(MS_RC_DEBUG_OPTION)
endif
ifndef COPYRIGHT_YEAR
COPYRIGHT_YEAR = 2007
endif
RC_FLAGS += -d "JDK_BUILD_ID=$(FULL_VERSION)" \
-d "JDK_COMPANY=$(COMPANY_NAME)" \
-d "JDK_COMPONENT=$(PRODUCT_NAME) Platform SE binary" \
-d "JDK_VER=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)" \
-d "JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
-d "JDK_NAME=$(PRODUCT_NAME) Platform SE $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)" \
-d "JDK_FVER=$(JDK_VERSION)"
......@@ -73,54 +73,10 @@ JDK_LOCALES = ja zh_CN
#
JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
#
# All libraries except libjava and libjvm itself link against libjvm and
# libjava, the latter for its exported common utilities. libjava only links
# against libjvm. Programs' makefiles take their own responsibility for
# adding other libs.
#
ifdef PACKAGE
# put JAVALIB first, but do not lose any platform specific values....
LDLIBS_COMMON = $(JAVALIB)
endif # PACKAGE
#
# Libraries that must appear ahead of libc.so on the link command line
#
ifdef PROGRAM
ifeq ($(PLATFORM), solaris)
LDLIBS_COMMON = -lthread -ldl
endif
ifeq ($(PLATFORM), linux)
LDLIBS_COMMON = -ldl
endif
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)
#
# Default is to build, not import native binaries
#
ifndef IMPORT_NATIVE_BINARIES
IMPORT_NATIVE_BINARIES=false
endif
# If importing libraries in, no incremental builds
ifeq ($(IMPORT_NATIVE_BINARIES),true)
INCREMENTAL_BUILD=false
endif
# for generated libraries
LIBDIR = $(OUTPUTDIR)/lib
ABS_LIBDIR = $(ABS_OUTPUTDIR)/lib
# Optional place to save the windows .lib files
LIBFILES_DIR = $(OUTPUTDIR)/libfiles
# for ext jre files
EXTDIR = $(LIBDIR)/ext
# for generated include files
INCLUDEDIR = $(OUTPUTDIR)/include
# for generated class files
CLASSBINDIR = $(OUTPUTDIR)/classes
DEMOCLASSDIR = $(OUTPUTDIR)/democlasses
......@@ -131,8 +87,6 @@ BUILDTOOLJARDIR = $(OUTPUTDIR)/btjars
ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
# for generated java source files
GENSRCDIR = $(OUTPUTDIR)/gensrc
# for generated C source files (not javah)
GENNATIVESRCDIR = $(OUTPUTDIR)/gennativesrc
# for imported source files
IMPORTSRCDIR = $(OUTPUTDIR)/impsrc
# for imported documents
......@@ -196,19 +150,6 @@ override ABS_TEMPDIR = $(ABS_OUTPUTDIR)/$(UNIQUE_PATH)
dummy1:=$(shell $(MKDIR) -p $(TEMPDIR))
dummy2:=$(shell $(MKDIR) -p $(TEMP_DISK))
# OBJDIRNAME is the name of the directory where the object code is to
# be placed. It's name depends on whether the data model architecture
# is 32-bit or not.
ifneq ($(ARCH_DATA_MODEL), 32)
OBJDIRNAME = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX)
else
OBJDIRNAME = obj$(OBJDIRNAME_SUFFIX)
endif
OBJDIR = $(TEMPDIR)/$(OBJDIRNAME)
# CLASSHDRDIR is where the generated C Class Header files go.
CLASSHDRDIR = $(TEMPDIR)/CClassHeaders
#
# CLASSDESTDIR can be used to specify the directory where generated classes
# are to be placed. The default is CLASSBINDIR.
......@@ -217,11 +158,6 @@ ifndef CLASSDESTDIR
CLASSDESTDIR = $(CLASSBINDIR)
endif
INCLUDES = -I. -I$(CLASSHDRDIR) \
$(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
OTHER_CPPFLAGS = $(INCLUDES)
#
# vpaths. These are the default locations searched for source files.
# GNUmakefiles of individual areas often override the default settings.
......@@ -235,35 +171,6 @@ VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPA
VPATH.java = $(VPATH0.java)
vpath %.java $(VPATH.java)
vpath %.class $(CLASSBINDIR)
vpath %.$(OBJECT_SUFFIX) $(OBJDIR)
#
# VPATH.h is used elsewhere to generate include flags. By default,
# anyone has access to the include files that the JVM area exports,
# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific
# relatives.
#
ifeq ($(PLATFORM), windows)
VPATH.h = $(BOOTDIR)/include;$(BOOTDIR)/include/$(PLATFORM_INCLUDE_NAME)
else
VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/include$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/javavm/include
endif
vpath %.h $(VPATH.h)
#
# Used in two ways: helps link against libjava.so. Also if overridden
# determines where your shared library is installed.
#
ifndef LIB_LOCATION
LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
endif
#
# Java header and stub variables
#
CLASSHDRS = $(patsubst %,$(CLASSHDRDIR)/%.h,$(subst .,_,$(CLASSES.export)))
CLASSSTUBOBJS = classstubs.$(OBJECT_SUFFIX)
STUBPREAMBLE = $(INCLUDEDIR)/StubPreamble.h
#
# Classpath seen by javac (different from the one seen by the VM
......@@ -338,38 +245,9 @@ define OTHERSUBDIRS-loop
done
endef
#
# Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is
# used for this file, otherwise the default settings are used.
#
CFLAGS_$(VARIANT)/BYFILE = $(CFLAGS_$(VARIANT)/$(@F)) \
$(CFLAGS_$(VARIANT)$(CFLAGS_$(VARIANT)/$(@F)))
CXXFLAGS_$(VARIANT)/BYFILE = $(CXXFLAGS_$(VARIANT)/$(@F)) \
$(CXXFLAGS_$(VARIANT)$(CXXFLAGS_$(VARIANT)/$(@F)))
#
# Tool flags
#
ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
$(DEFINES) $(OPTIONS:%=-D%)
LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
$(OTHER_LINTFLAGS)
# this should be moved into Defs-<platform>.gmk.....
ifeq ($(PLATFORM), windows)
VERSION_DEFINES = -DRELEASE="\"$(RELEASE)\""
else
VERSION_DEFINES = -DRELEASE='"$(RELEASE)"'
endif
# Prevent the use of many default suffix rules we do not need
.SUFFIXES:
.SUFFIXES: .c .o .h .obj .cpp .hpp .java .class
.SUFFIXES: .java .class
# Make sure we are all insane
ifdef INSANE
......
#
# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Generic makefile for building shared libraries.
#
include $(TOPDIR)/make/common/Classes.gmk
#
# It is important to define these *after* including Classes.gmk
# in order to override the values defined inthat makefile.
#
ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
ACTUAL_LIBRARY_DIR = $(LIB_LOCATION)
ACTUAL_LIBRARY = $(ACTUAL_LIBRARY_DIR)/$(ACTUAL_LIBRARY_NAME)
library:: $(ACTUAL_LIBRARY)
FILES_o = $(patsubst %.c, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
FILES_o += $(patsubst %.s, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_s))))
FILES_o += $(patsubst %.cpp, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
ifeq ($(INCREMENTAL_BUILD),true)
FILES_d = $(patsubst %.c, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
FILES_d += $(patsubst %.cpp, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
endif # INCREMENTAL_BUILD
ifeq ($(PLATFORM),solaris)
# List of all lint files, one for each .c file (only for C)
FILES_ln = $(patsubst %.c, %.$(LINT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
endif
#
# C++ libraries must be linked with CC.
#
ifdef CPLUSPLUSLIBRARY
LINKER=$(LINK.cc)
else
LINKER=$(LINK.c)
endif
# We either need to import (copy) libraries in, or build them
$(ACTUAL_LIBRARY):: $(INIT) $(TEMPDIR) $(LIBDIR) $(BINDIR) $(EXTDIR) classheaders
#
# COMPILE_APPROACH: Different approaches to compile up the native object
# files as quickly as possible.
# The setting of parallel works best on Unix, batch on Windows.
#
COMPILE_FILES_o = $(OBJDIR)/.files_compiled
$(COMPILE_FILES_o): $(FILES_d) $(FILES_o)
@$(ECHO) "$<" >> $@
clean::
$(RM) $(COMPILE_FILES_o)
#
# COMPILE_APPROACH=parallel: Will trigger compilations (just compilations) to
# happen in parallel. Greatly decreases Unix build time, even on single CPU
# machines, more so on multiple CPU machines. Default is 2 compiles
# at a time, but can be adjusted with ALT_PARALLEL_COMPILE_JOBS.
# Note that each .d file will also be dependent on it's .o file, see
# Rules.gmk.
# Note this does not depend on Rules.gmk to work like batch (below)
# and this technique doesn't seem to help Windows build time nor does
# it work very well, it's possible the Windows Visual Studio compilers
# don't work well in a parallel situation, this needs investigation.
#
ifeq ($(COMPILE_APPROACH),parallel)
.PHONY: library_parallel_compile
library_parallel_compile:
@$(ECHO) "Begin parallel compiles: $(shell $(PWD))"
@$(MAKE) -j $(PARALLEL_COMPILE_JOBS) $(COMPILE_FILES_o)
@$(ECHO) "Done with parallel compiles: $(shell $(PWD))"
$(ACTUAL_LIBRARY):: library_parallel_compile
endif
#
# COMPILE_APPROACH=batch: Will trigger compilations (just compilations) to
# happen in batch mode. Greatly decreases Windows build time.
# See logic in Rules.gmk for how compiles happen, the $(MAKE) in
# library_batch_compile below triggers the actions in Rules.gmk.
# Note that each .d file will also be dependent on it's .o file, see
# Rules.gmk.
#
ifeq ($(COMPILE_APPROACH),batch)
.PHONY: library_batch_compile
library_batch_compile:
@$(ECHO) "Begin BATCH compiles: $(shell $(PWD))"
$(MAKE) $(COMPILE_FILES_o)
$(MAKE) batch_compile
@$(ECHO) "Done with BATCH compiles: $(shell $(PWD))"
$(MAKE) COMPILE_APPROACH=normal $(COMPILE_FILES_o)
$(ACTUAL_LIBRARY):: library_batch_compile
endif
ifeq ($(PLATFORM), windows)
#
# Library building rules.
#
$(LIBRARY).lib:: $(OBJDIR)
# build it into $(OBJDIR) so that the other generated files get put
# there, then copy just the DLL (and MAP file) to the requested directory.
#
$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
@$(prep-target)
@$(MKDIR) -p $(OBJDIR)
$(LINK) -dll -out:$(OBJDIR)/$(@F) \
-map:$(OBJDIR)/$(LIBRARY).map \
$(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \
$(OTHER_LCF) $(JAVALIB) $(LDLIBS)
$(CP) $(OBJDIR)/$(@F) $@
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
$(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
@$(prep-target)
@$(MKDIR) -p $(TEMPDIR)
@$(ECHO) $(FILES_o) > $@
ifndef LOCAL_RESOURCE_FILE
@$(ECHO) $(OBJDIR)/$(LIBRARY).res >> $@
endif
@$(ECHO) Created $@
RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
/D "JDK_INTERNAL_NAME=$(LIBRARY)" \
/D "JDK_FTYPE=0x2L"
$(OBJDIR)/$(LIBRARY).res: $(VERSIONINFO_RESOURCE)
ifndef LOCAL_RESOURCE_FILE
@$(prep-target)
$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
endif
#
# Install a .lib file if required.
#
ifeq ($(INSTALL_DOT_LIB), true)
$(ACTUAL_LIBRARY):: $(LIBDIR)/$(LIBRARY).lib
clean::
-$(RM) $(LIBDIR)/$(LIBRARY).lib
$(LIBDIR)/$(LIBRARY).lib:: $(OBJDIR)/$(LIBRARY).lib
$(install-file)
$(LIBDIR)/$(LIBRARY).dll:: $(OBJDIR)/$(LIBRARY).dll
$(install-file)
endif # INSTALL_DOT_LIB
else # PLATFORM
#
# On Solaris, use mcs to write the version into the comment section of
# the shared library. On other platforms set this to false at the
# make command line.
#
$(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder)
@$(prep-target)
@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), _OPT=$(_OPT)"
@$(ECHO) "Rebuilding $@ because of $?"
$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
ifeq ($(WRITE_LIBVERSION),true)
$(MCS) -d -a "$(FULL_VERSION)" $@
endif # WRITE_LIBVERSION
endif # PLATFORM
#
# Cross check all linted files against each other
#
ifeq ($(PLATFORM),solaris)
lint.errors : $(FILES_ln)
$(LINT.c) $(FILES_ln) $(LDLIBS)
endif
#
# Class libraries with JNI native methods get a include to the package.
#
ifdef PACKAGE
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)
OTHER_INCLUDES += -I$(SHARE_SRC)/native/common -I$(PLATFORM_SRC)/native/common
OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR) \
-I$(PLATFORM_SRC)/native/$(PKGDIR)
endif
#
# Clean/clobber rules
#
clean::
$(RM) -r $(ACTUAL_LIBRARY)
clobber:: clean
#
# INCREMENTAL_BUILD means that this workspace will be built over and over
# possibly incrementally. This means tracking the object file dependencies
# on include files so that sources get re-compiled when the include files
# change. When building from scratch and doing a one time build (like
# release engineering or nightly builds) set INCREMENTAL_BUILD=false.
#
ifeq ($(INCREMENTAL_BUILD),true)
#
# Workaround: gnumake sometimes says files is empty when it shouldn't
# was: files := $(foreach file, $(wildcard $(OBJDIR)/*.$(DEPEND_SUFFIX)), $(file))
#
files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
#
# Only include these files if we have any.
#
ifneq ($(strip $(files)),)
include $(files)
endif # files
endif # INCREMENTAL_BUILD
#
# Default dependencies
#
all: build
build: library
debug:
$(MAKE) VARIANT=DBG build
fastdebug:
$(MAKE) VARIANT=DBG FASTDEBUG=true build
.PHONY: all build debug fastdebug
#
# Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for linking with mapfiles.
#
# NOTE: Not using a mapfile will expose all your extern functions and
# extern data symbols as part of your interface, so unless your
# extern names are safe from being mistaken as names from other
# libraries, you better use a mapfile, or use a unique naming
# convention on all your extern symbols.
#
# The mapfile will establish versioning by defining the exported interface.
#
# The mapfile can also force certain .o files or elf sections into the
# the different segments of the resulting library/program image.
#
# The macro FILES_m can contain any number of mapfiles.
#
# Always make sure 'all' is the default rule
mapfile_default_rule: all
ifeq ($(PLATFORM), solaris)
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
ifndef FILES_m
FILES_m = mapfile-vers
endif
# If we are re-ordering functions in this solaris library, we need to make
# sure that -xF is added to the compile lines. This option is critical and
# enables the functions to be reordered.
ifdef FILES_reorder
CFLAGS_OPT += -xF
CXXFLAGS_OPT += -xF
endif
INIT += $(TEMPDIR)/mapfile-vers
$(TEMPDIR)/mapfile-vers : $(FILES_m) $(FILES_reorder)
$(prep-target)
$(CAT) $(FILES_m) > $@
ifdef FILES_reorder
$(SED) -e 's=OUTPUTDIR=$(OUTPUTDIR)=' $(FILES_reorder) >> $@
endif
endif # VARIANT
ifndef LDNOMAP
LDMAPFLAGS_OPT = -M$(TEMPDIR)/mapfile-vers
LDMAPFLAGS_DBG = $(FILES_m:%=-M%)
endif
endif # PLATFORM
ifeq ($(PLATFORM), linux)
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
ifndef FILES_m
FILES_m = mapfile-vers
endif
endif # VARIANT
ifndef LDNOMAP
LDMAPFLAGS_OPT = $(FILES_m:%=-Xlinker -version-script=%)
LDMAPFLAGS_DBG = $(FILES_m:%=-Xlinker -version-script=%)
endif
endif # PLATFORM
LDFLAGS_OPT += $(LDMAPFLAGS_OPT)
LDFLAGS_DBG += $(LDMAPFLAGS_DBG)
......@@ -34,7 +34,7 @@ rules_default_rule: all
#
# Directory set up. (Needed by deploy workspace)
#
$(CLASSDESTDIR) $(CLASSHDRDIR) $(OBJDIR) $(OUTPUTDIR) $(BINDIR) $(LIBDIR) $(LIBDIR)/$(LIBARCH) $(TEMPDIR) $(EXTDIR):
$(CLASSDESTDIR) $(OUTPUTDIR) $(TEMPDIR) $(EXTDIR):
$(MKDIR) -p $@
#
......@@ -163,9 +163,6 @@ $(CLASSDESTDIR)/%.class: $(SHARE_SRC)/classes/%.java
# List of class files needed
FILES_class = $(FILES_java:%.java=$(CLASSDESTDIR)/%.class)
# Got to include exported files.
FILES_class += $(FILES_export:%.java=$(CLASSDESTDIR)/%.class)
# Construct list of java sources we need to compile
source_list_prime:
@$(MKDIR) -p $(TEMPDIR)
......@@ -214,50 +211,7 @@ endif
classes.clean: packages.clean
$(RM) $(JAVA_SOURCE_LIST)
#
# C and C++ make dependencies
#
include $(TOPDIR)/make/common/internal/NativeCompileRules.gmk
#
# Running Javah to generate stuff into CClassHeaders.
#
ifdef FILES_export
CLASSES.export = $(subst /,.,$(FILES_export:%.java=%))
CLASSES.export += $(subst /,.,$(FILES_export2:%.java=%))
CLASSES.export += $(subst /,.,$(FILES_export3:%.java=%))
CLASSES_export = $(FILES_export:%.java=$(CLASSDESTDIR)/%.class)
CLASSES_export += $(FILES_export2:%.java=$(CLASSDESTDIR)/%.class)
CLASSES_export += $(FILES_export3:%.java=$(CLASSDESTDIR)/%.class)
# Fix when deploy workspace makefiles don't depend on this name
#CLASSHDR_DOTFILE=$(CLASSHDRDIR)/.classheaders
CLASSHDR_DOTFILE=$(OBJDIR)/.class.headers.$(ARCH)
classheaders: classes $(CLASSHDR_DOTFILE)
$(CLASSHDR_DOTFILE): $(CLASSES_export)
$(prep-target)
$(JAVAH_CMD) -d $(CLASSHDRDIR)/ \
$(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner))
@$(java-vm-cleanup)
@$(TOUCH) $@
classheaders.clean:
$(RM) -r $(CLASSHDRDIR) $(CLASSHDR_DOTFILE)
else # FILES_export
classheaders: classes
classheaders.clean:
endif # FILES_export
clean clobber:: classheaders.clean classes.clean .delete.classlist
clean clobber:: classes.clean .delete.classlist
#
# Default dependencies
......@@ -265,12 +219,11 @@ clean clobber:: classheaders.clean classes.clean .delete.classlist
all: build
build: classheaders
build: classes
default: all
.PHONY: all build clean clobber \
.delete.classlist classes .compile.classlist classes.clean \
classheaders classheaders.clean \
batch_compile
#
# Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Native C/C++ Compile Rules
#
#
# INCREMENTAL_BUILD: Record the #include file dependencies.
#
# NOTE: We build make include files with the suffix
# $(DEPEND_SUFFIX) on every compilation. These are initially
# created as temp files just in case a ^C kills it in the middle.
# Compiler is smart enough to handle ^C and not create the .o file, or
# is supposed to be that smart, but the .$(DEPEND_SUFFIX) file
# creation here isn't.
# These .$(DEPEND_SUFFIX) files are included by Library.gmk and
# Program.gmk, when they exist (Search for 'make dependencies').
#
ifeq ($(INCREMENTAL_BUILD),true)
$(OBJDIR)/%.$(DEPEND_SUFFIX): %.c
@$(prep-target)
@$(ECHO) "Creating $@"
@$(RM) $@.temp
@$(CC) $(CC_DEPEND) $(CPPFLAGS) $< 2> $(DEV_NULL) | \
$(CC_DEPEND_FILTER) > $@.temp
@$(MV) $@.temp $@
$(OBJDIR)/%.$(DEPEND_SUFFIX): %.cpp
@$(prep-target)
@$(ECHO) "Creating $@"
@$(RM) $@.temp
@$(CXX) $(CC_DEPEND) $(CPPFLAGS) $(CXXFLAGS) $< 2> $(DEV_NULL) | \
$(CC_DEPEND_FILTER) > $@.temp
@$(MV) $@.temp $@
endif # INCREMENTAL_BUILD
#
# C, C++, asm files.
#
# Normal or parallel compile rule is the same, but batch compiles require
# we save up the sources files that use the same compile line so that we
# can do one compile line.
#
ifneq ($(COMPILE_APPROACH), batch)
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
@$(prep-target)
$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
@$(check-conventions)
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
@$(prep-target)
$(COMPILE.cc) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
@$(check-conventions)
else
#
# Batch compiling might be faster if the compiler was smart about recognizing
# optimization opportunities available when all files are being compiled
# the same way. Unfortunately this is rare.
# Automatic pre-compiled headers (pch) might be a possibility so we
# add any auto pch options here.
# So we save all the source files that have the same compile line as the
# first file. A normal compile pass is made after the batch compile
# to catch anything missed.
# If the compilers had a -o option that allowed us to direct where to
# write the object files to, then we would not need to save the object
# file list or move them from the make directory to the build directory.
#
# Source names
COMPILE_LIST.c = $(OBJDIR)/.source_names_c
COMPILE_LIST.cpp = $(OBJDIR)/.source_names_cpp
# Object file list
COMPILE_OBJ_LIST.c = $(OBJDIR)/.obj_names_c
COMPILE_OBJ_LIST.cpp = $(OBJDIR)/.obj_names_cpp
# The compile line
COMPILE_BATCH.c = $(OBJDIR)/.compile_c
COMPILE_BATCH.cpp = $(OBJDIR)/.compile_cpp
# The compile line for the current target
THIS_COMPILE_BATCH.c = $(COMPILE_BATCH.c)-$(@F)
THIS_COMPILE_BATCH.cpp = $(COMPILE_BATCH.cpp)-$(@F)
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
@$(prep-target)
@$(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.c)
@if [ ! -s $(COMPILE_BATCH.c) ] ; then \
$(CP) $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c) ; \
$(ECHO) $< > $(COMPILE_LIST.c); \
$(ECHO) $(@F) > $(COMPILE_OBJ_LIST.c); \
elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c)`" \
= "" ] ; then \
$(ECHO) $< >> $(COMPILE_LIST.c); \
$(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.c); \
fi
@$(RM) $(THIS_COMPILE_BATCH.c)
@$(check-conventions)
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
@$(prep-target)
@$(ECHO) "$(COMPILE.cpp) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.cpp)
@if [ ! -s $(COMPILE_BATCH.cpp) ] ; then \
$(CP) $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp) ; \
$(ECHO) $< > $(COMPILE_LIST.cpp); \
$(ECHO) $(@F) > $(COMPILE_OBJ_LIST.cpp); \
elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp)`"\
= "" ] ; then \
$(ECHO) $< >> $(COMPILE_LIST.cpp); \
$(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.cpp); \
fi
@$(RM) $(THIS_COMPILE_BATCH.cpp)
@$(check-conventions)
batch_compile: $(FILES_o)
@$(ECHO) "Doing batch compilations"
@if [ -s $(COMPILE_LIST.c) ] ; then \
$(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
`$(CAT) $(COMPILE_LIST.c)`" ; \
( $(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
`$(CAT) $(COMPILE_LIST.c)` && \
$(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR)" && \
$(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR) ) || exit 1 ; \
fi
@if [ -s $(COMPILE_LIST.cpp) ] ; then \
$(ECHO) "$(COMPILE.cpp) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
`$(CAT) $(COMPILE_LIST.cpp)`" ; \
( $(COMPILE.cpp) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
`$(CAT) $(COMPILE_LIST.cpp)` && \
$(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR)" && \
$(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR) ) || exit 1 ; \
fi
@$(RM) $(COMPILE_BATCH.c) $(COMPILE_LIST.c) $(COMPILE_OBJ_LIST.c)
@$(RM) $(COMPILE_BATCH.cpp) $(COMPILE_LIST.cpp) $(COMPILE_OBJ_LIST.cpp)
endif
# newer as does not handle c++ style comments
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.s
ifneq ($(CC_VERSION), gcc)
@$(prep-target)
$(COMPILE.s) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
else
@$(prep-target)
$(CPP) -x assembler-with-cpp $< | $(COMPILE.s) -o $@
endif
@$(check-conventions)
#
# Quick hack for making the compiler generate just the assembly file.
# $ gnumake obj/sparc/myfile.s
#
$(OBJDIR)/%.s: %.c
@$(prep-target)
$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ -S $<
@$(check-conventions)
# remove the intermediate files from the directories.
# (If VARIANT=OPT, this removes all debug and fastdebug files too)
clobber clean::
$(RM) -r $(OBJDIR)
$(RM) -r $(OBJDIR)_*
#
# Lint support
# (The 'lint' rule below is an older rule not using the .$(LINT_SUFFIX) files)
#
ifeq ($(PLATFORM), solaris)
$(OBJDIR)/%.$(LINT_SUFFIX): %.c
@$(prep-target)
$(LINT.c) -dirout=$(OBJDIR) -c $<
lint.clean:
$(RM) $(OBJDIR)/*.$(LINT_SUFFIX)
# Old rule
lint: $(FILES_c)
ifneq ($(FILES_c),)
$(LINT.c) -Ncheck -Nlevel=3 $? $(LDLIBS) > lint.$(ARCH) 2>&1
endif
endif
.PHONY: batch_compile
#
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# GCC Compiler settings
#
COMPILER_NAME=GCC
ifeq ($(PLATFORM), windows)
# Settings specific to Windows, pretty stale, hasn't been used
CC = $(COMPILER_PATH)gcc
CPP = $(COMPILER_PATH)gcc -E
CXX = $(COMPILER_PATH)g++
CCC = $(COMPILER_PATH)g++
LIBEXE = $(COMPILER_PATH)lib
LINK = $(COMPILER_PATH)link
RC = $(MSDEVTOOLS_PATH)link
LINK32 = $(LINK)
RSC = $(RC)
# unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
ifeq ($(ARCH_DATA_MODEL), 32)
CC_VER = UNKNOWN
CC_TYPE = UNKNOWN
else
CC_VER = UNKNOWN
CC_TYPE = UNKNOWN
endif
_LINK_VER :=$(shell $(LINK) 2>&1 | $(HEAD) -n 1)
LINK_VER :=$(call GetVersion,"$(_LINK_VER)")
endif
ifeq ($(PLATFORM), linux)
# Settings specific to Linux
CC = $(COMPILER_PATH)gcc
CPP = $(COMPILER_PATH)gcc -E
# statically link libstdc++ before C++ ABI is stablized on Linux
STATIC_CXX = true
ifeq ($(STATIC_CXX),true)
# g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++"
# We need to use gcc to statically link the C++ runtime. gcc and g++ use
# the same subprocess to compile C++ files, so it is OK to build using gcc.
CXX = $(COMPILER_PATH)gcc
else
CXX = $(COMPILER_PATH)g++
endif
ifeq ($(ZERO_BUILD), true)
# zero
REQUIRED_CC_VER = 3.2
REQUIRED_GCC_VER = 3.2.*
else
ifneq ("$(findstring sparc,$(ARCH))", "")
# sparc or sparcv9
REQUIRED_CC_VER = 4.0
else
ifeq ($(ARCH_DATA_MODEL), 32)
# i586
REQUIRED_CC_VER = 3.2
else
ifeq ($(ARCH), amd64)
# amd64
REQUIRED_CC_VER = 3.2
endif
ifeq ($(ARCH), ia64)
# ia64
REQUIRED_CC_VER = 3.2
endif
endif
endif
endif
# Option used to create a shared library
SHARED_LIBRARY_FLAG = -shared -mimpure-text
SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
endif
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris
CC = $(COMPILER_PATH)gcc
CPP = $(COMPILER_PATH)gcc -E
CXX = $(COMPILER_PATH)g++
REQUIRED_CC_VER = 3.2
# Option used to create a shared library
SHARED_LIBRARY_FLAG = -G
endif
# Get gcc version
_CC_VER :=$(shell $(CC) -dumpversion 2>&1 )
CC_VER :=$(call GetVersion,"$(_CC_VER)")
#
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# MSVC Compiler settings
#
ifeq ($(PLATFORM), windows)
CC = $(COMPILER_PATH)cl
CPP = $(COMPILER_PATH)cl
CXX = $(COMPILER_PATH)cl
CCC = $(COMPILER_PATH)cl
LIBEXE = $(COMPILER_PATH)lib
LINK = $(COMPILER_PATH)link
RC = $(MSDEVTOOLS_PATH)rc
LINK32 = $(LINK)
RSC = $(RC)
# Fill in unknown values
COMPILER_NAME=Unknown MSVC Compiler
COMPILER_VERSION=
REQUIRED_CC_VER=
REQUIRED_LINK_VER=
# unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
# Compiler version and type (Always get word after "Version")
ifndef CC_VER
CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
export CC_VER
endif
# SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
ifeq ($(ARCH_DATA_MODEL), 32)
ifndef LINK_VER
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
export LINK_VER
endif
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
ifeq ($(CC_MAJORVER), 13)
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
REQUIRED_CC_VER = 13.10.3077
REQUIRED_LINK_VER = 7.10.3077
COMPILER_NAME=Visual Studio .NET 2003 Professional C++
COMPILER_VERSION=VS2003
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl
ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
ifeq ($(CC_MAJORVER), 14)
# This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42
REQUIRED_CC_VER = 14.00.50727.42
REQUIRED_LINK_VER = 8.00.50727.42
COMPILER_NAME=Visual Studio 8
COMPILER_VERSION=VS2005
REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
ifeq ($(CC_MAJORVER), 15)
# This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08
REQUIRED_CC_VER = 15.00.21022.08
REQUIRED_LINK_VER = 9.00.21022.08
COMPILER_NAME=Visual Studio 9
COMPILER_VERSION=VS2008
#rebase and midl moved out of Visual Studio into the SDK:
REBASE = $(MSDEVTOOLS_PATH)/rebase
MTL = $(MSDEVTOOLS_PATH)/midl.exe
ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
ifeq ($(CC_MAJORVER), 16)
# This should be: CC_VER=16.00.30319.01 LINK_VER=10.00.30319.01
REQUIRED_CC_VER = 16.00.30319.01
REQUIRED_LINK_VER = 10.00.30319.01
COMPILER_NAME=Visual Studio 10
COMPILER_VERSION=VS2010
#rebase and midl moved out of Visual Studio into the SDK:
REBASE = $(MSDEVTOOLS_PATH)/rebase
MTL = $(MSDEVTOOLS_PATH)/midl.exe
ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
else
# else ARCH_DATA_MODEL is 64
ifndef LINK_VER
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
export LINK_VER
endif
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
CC_MINORVER :=$(call MinorVersion,$(CC_VER))
CC_MICROVER :=$(call MicroVersion,$(CC_VER))
ifeq ($(ARCH), ia64)
REQUIRED_CC_VER = 13.00.9337.7
REQUIRED_LINK_VER = 7.00.9337.7
endif
ifeq ($(ARCH), amd64)
REQUIRED_CC_VER = 14.00.40310.41
REQUIRED_LINK_VER = 8.00.40310.39
endif
ifeq ($(CC_MAJORVER), 13)
ifeq ($(ARCH), ia64)
# This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7
COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition
COMPILER_VERSION=VS2003
endif
endif
ifeq ($(CC_MAJORVER), 14)
ifeq ($(ARCH), amd64)
ifeq ($(CC_MICROVER), 30701)
# This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701
# WARNING: it says 14, but it is such an early build it doesn't
# have all the VS2005 compiler option changes, so treat
# this like a VS2003 compiler.
COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition
COMPILER_VERSION=VS2003
else
# This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39
COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830)
COMPILER_VERSION=VS2005
endif
endif
endif
ifeq ($(CC_MAJORVER), 15)
# This should be: CC_VER=15.00.21022.8 LINK_VER=9.00.21022.8
REQUIRED_CC_VER = 15.00.21022.8
REQUIRED_LINK_VER = 9.00.21022.8
COMPILER_NAME=Windows SDK 6.1 Visual Studio 9
COMPILER_VERSION=VS2008
RC = $(MSSDK61)/bin/x64/rc
REBASE = $(MSSDK61)/bin/x64/rebase
else
ifeq ($(CC_MAJORVER), 16)
# This should be: CC_VER=16.00.30319.01 LINK_VER=9.00.30319.01
REQUIRED_CC_VER = 16.00.30319.01
REQUIRED_LINK_VER = 10.00.30319.01
COMPILER_NAME=Microsoft Visual Studio 10
COMPILER_VERSION=VS2010
RC = $(MSSDK7)/bin/x64/rc
REBASE = $(MSSDK7)/bin/x64/rebase
else
# This will cause problems if ALT_COMPILER_PATH is defined to ""
# which is a directive to use the PATH.
REBASE = $(COMPILER_PATH)../REBASE
endif
endif
ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
ifndef COMPILER_VERSION
COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here)
endif
# Shared library generation flag
SHARED_LIBRARY_FLAG = -LD
endif
......@@ -42,7 +42,7 @@ else
endif
#
# All java tools (javac, javah, and javadoc) run faster with certain java
# All java tools (javac and javadoc) run faster with certain java
# options, this macro should be used with all these tools.
# In particular, the client VM makes these tools run faster when
# it's available.
......@@ -134,21 +134,14 @@ JAVACFLAGS += -encoding ascii
JAVACFLAGS += -classpath $(BOOTDIR)/lib/tools.jar
JAVACFLAGS += $(OTHER_JAVACFLAGS)
# Needed for javah
JAVAHFLAGS += -classpath $(CLASSBINDIR)
# Langtools
ifdef LANGTOOLS_DIST
JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
JAVAH_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javah.jar
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
JAVAC_CMD = $(BOOT_JAVA_CMD) \
"-Xbootclasspath/p:$(JAVAC_JAR)" \
-jar $(JAVAC_JAR) $(JAVACFLAGS)
JAVAH_CMD = $(BOOT_JAVA_CMD) \
"-Xbootclasspath/p:$(JAVAH_JAR)$(CLASSPATH_SEPARATOR)$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)" \
-jar $(JAVAH_JAR) $(JAVAHFLAGS)
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
-jar $(JAVADOC_JAR)
......@@ -156,8 +149,6 @@ else
# If no explicit tools, use boot tools (add VM flags in this case)
JAVAC_CMD = $(JAVA_TOOLS_DIR)/javac $(JAVAC_JVM_FLAGS) \
$(JAVACFLAGS)
JAVAH_CMD = $(JAVA_TOOLS_DIR)/javah \
$(JAVAHFLAGS)
JAVADOC_CMD = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%)
endif
......
......@@ -94,14 +94,6 @@ else
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
endif
# COMPILER_PATH: path to where the compiler and tools are installed.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
else
COMPILER_PATH =/usr/bin/
endif
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
......
......@@ -86,24 +86,6 @@ else
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
endif
# COMPILER_PATH: path to where the compiler and tools are installed.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
else
# Careful here, COMPILER_VERSION may not be defined yet (see Compiler.gmk)
# If the place where we keep a set of Sun Studio compilers doesn't exist,
# try and use /opt/SUNWspro, the default location for the SS compilers.
# (DirExists checks for this path twice, an automount double check)
_SUNSTUDIO_SET_ROOT=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/SUNWspro
SUNSTUDIO_SET_ROOT:=$(call DirExists,$(_SUNSTUDIO_SET_ROOT),$(_SUNSTUDIO_SET_ROOT),)
ifneq ($(SUNSTUDIO_SET_ROOT),)
COMPILER_PATH =$(SUNSTUDIO_SET_ROOT)/$(COMPILER_VERSION)/bin/
else
COMPILER_PATH =/opt/SUNWspro/bin/
endif
endif
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
......
......@@ -31,7 +31,6 @@
# Level: Default is 3, 0 means none, 4 is the most but may be unreliable
# Some makefiles may have set this to 0 to turn off warnings completely,
# which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
# Program.gmk may turn this down to 2 (building .exe's).
# Windows 64bit platforms are less likely to be warning free.
# Historically, Windows 32bit builds should be mostly warning free.
ifndef COMPILER_WARNING_LEVEL
......@@ -74,7 +73,7 @@ override INCREMENTAL_BUILD = false
# The ALT values should never really have spaces or use \.
# Suspect these environment variables to have spaces and/or \ characters:
# SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
# MSTOOLS, Mstools, MSSDK, MSSdk, VC71COMNTOOLS,
# VC71COMNTOOLS,
# MSVCDIR, MSVCDir.
# So use $(subst \,/,) on them first adding quotes and placing them in
# their own variable assigned with :=, then use FullPath.
......@@ -201,124 +200,6 @@ ifndef SHORTPROGRAMFILES
export SHORTPROGRAMFILES
endif
# Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
ifeq ($(ARCH_DATA_MODEL), 32)
ifndef SHORTMSVCDIR
# Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
ifdef MSVCDIR
xMSVCDIR :="$(subst \,/,$(MSVCDIR))"
SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
else
ifdef MSVCDir
xMSVCDIR :="$(subst \,/,$(MSVCDir))"
SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
else
ifneq ($(SHORTPROGRAMFILES),)
xMSVCDIR :="$(SHORTPROGRAMFILES)/Microsoft Visual Studio .NET 2003/Vc7"
SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
endif
endif
endif
ifneq ($(subst MSDev98,OLDOLDOLD,$(SHORTMSVCDIR)),$(SHORTMSVCDIR))
SHORTMSVCDIR :=
endif
# If we still don't have it, look for VS100COMNTOOLS, setup by installer?
ifeq ($(SHORTMSVCDIR),)
ifdef VS100COMNTOOLS # /Common/Tools directory, use ../../Vc
xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
_vs100tools :=$(call FullPath,$(xVS100COMNTOOLS))
endif
ifneq ($(_vs100tools),)
SHORTMSVCDIR :=$(_vs100tools)/../../Vc
endif
endif
export SHORTMSVCDIR
# If we still don't have it, look for VS71COMNTOOLS, setup by installer?
ifeq ($(SHORTMSVCDIR),)
ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
_vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
endif
ifneq ($(_vs71tools),)
SHORTMSVCDIR :=$(_vs71tools)/../../Vc7
endif
endif
export SHORTMSVCDIR
endif
ifneq ($(SHORTMSVCDIR),)
SHORTCOMPILERBIN :=$(SHORTMSVCDIR)/Bin
SHORTPSDK :=$(SHORTMSVCDIR)/PlatformSDK
export SHORTCOMPILERBIN
export SHORTPSDK
endif
endif
# The Microsoft Platform SDK installed by itself
ifneq ($(SHORTPROGRAMFILES),)
ifndef SHORTPSDK
xPSDK :="$(SHORTPROGRAMFILES)/Microsoft Platform SDK"
SHORTPSDK :=$(call FullPath,$(xPSDK))
ifeq ($(SHORTPSDK),)
xPSDK :="$(SHORTPROGRAMFILES)/Microsoft SDK"
SHORTPSDK :=$(call FullPath,$(xMSSDK))
endif
export SHORTPSDK
endif
endif
# If no SDK found yet, look in other places
ifndef SHORTPSDK
ifdef MSSDK
xMSSDK :="$(subst \,/,$(MSSDK))"
SHORTPSDK :=$(call FullPath,$(xMSSDK))
else
ifdef MSSdk
xMSSDK :="$(subst \,/,$(MSSdk))"
SHORTPSDK :=$(call FullPath,$(xMSSDK))
endif
endif
export SHORTPSDK
endif
# Compilers for 64bit are from SDK
ifeq ($(ARCH_DATA_MODEL), 64)
ifndef SHORTCOMPILERBIN
ifdef VS100COMNTOOLS # /Common7/Tools directory, use ../../Vc
xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
_vs100tools :=$(call FullPath,$(xVS100COMNTOOLS))
endif
ifneq ($(_vs100tools),)
SHORTCOMPILERBIN :=$(_vs100tools)/../../Vc/bin/amd64
xMSSDK70 :="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/"
MSSDK7 :=$(call FullPath,$(xMSSDK70))
export MSSDK7
else
xMSSDK61 :="C:/Program Files/Microsoft SDKs/Windows/v6.1/"
MSSDK61 :=$(call FullPath,$(xMSSDK61))
xVS2008 :="C:/Program Files (x86)/Microsoft Visual Studio 9.0/"
_vs2008 :=$(call FullPath,$(xVS2008))
ifneq ($(_vs2008),)
ifeq ($(ARCH), ia64)
SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/x86_ia64
endif
ifeq ($(ARCH), amd64)
SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/$(ARCH)
endif
else
ifneq ($(SHORTPSDK),)
ifeq ($(ARCH), ia64)
SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64
endif
ifeq ($(ARCH), amd64)
SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64/x86/$(ARCH)
endif
endif
endif
endif
export SHORTCOMPILERBIN
endif
endif
# Location on system where jdk installs might be
ifneq ($(SHORTPROGRAMFILES),)
USRJDKINSTANCES_PATH =$(SHORTPROGRAMFILES)/Java
......@@ -356,55 +237,6 @@ ifndef JDK_DEVTOOLS_DIR
export JDK_DEVTOOLS_DIR
endif
# COMPILER_PATH: path to where the compiler and tools are installed.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifndef COMPILER_PATH
ifdef ALT_COMPILER_PATH
xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
else
COMPILER_PATH :=$(call PrefixPath,$(SHORTCOMPILERBIN))
endif
COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
export COMPILER_PATH
endif
# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifndef MSDEVTOOLS_PATH
ifdef ALT_MSDEVTOOLS_PATH
xALT_MSDEVTOOLS_PATH :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
MSDEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
else
ifeq ($(ARCH_DATA_MODEL), 64)
ifdef MSTOOLS
xMSTOOLS :="$(subst \,/,$(MSTOOLS))"
_ms_tools :=$(call FullPath,$(xMSTOOLS))
else
ifdef Mstools
xMSTOOLS :="$(subst \,/,$(Mstools))"
_ms_tools :=$(call FullPath,$(xMSTOOLS))
else
_ms_tools :=
endif
endif
ifneq ($(_ms_tools),)
_ms_tools_bin :=$(_ms_tools)/Bin
else
# Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
_ms_tools_bin :=$(SHORTCOMPILERBIN)/../../..
endif
else
_ms_tools_bin :=$(SHORTCOMPILERBIN)
endif
MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
endif
MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
export MSDEVTOOLS_PATH
endif
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifndef DEVTOOLS_PATH
......
......@@ -51,7 +51,7 @@
# Get shared system utilities macros defined
include $(BUILDDIR)/common/shared/Defs-utils.gmk
# Assumes ARCH, PLATFORM, ARCH_VM_SUBDIR, etc. have been defined.
# Assumes ARCH, PLATFORM, etc. have been defined.
# Simple pwd path
define PwdPath
......@@ -157,7 +157,6 @@ endef
_check_values:=\
$(call CheckValue,ARCH,),\
$(call CheckValue,ARCH_DATA_MODEL,),\
$(call CheckValue,ARCH_VM_SUBDIR,),\
$(call CheckValue,VARIANT,),\
$(call CheckValue,PLATFORM,)
......@@ -194,21 +193,15 @@ endif
# can be OPT or DBG, default is OPT
# Determine the extra pattern to add to the release name for debug/fastdebug.
# Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over.
# Determine suffix for obj directory or OBJDIR, for .o files.
# (by keeping .o files separate, just .o files, they don't clobber each
# other, however, the library files will clobber each other).
#
ifeq ($(VARIANT), DBG)
BUILD_VARIANT_RELEASE=-debug
OBJDIRNAME_SUFFIX=_g
else
BUILD_VARIANT_RELEASE=
OBJDIRNAME_SUFFIX=
endif
ifeq ($(FASTDEBUG), true)
VARIANT=DBG
BUILD_VARIANT_RELEASE=-fastdebug
OBJDIRNAME_SUFFIX=_gO
_JDK_IMPORT_VARIANT=/fastdebug
endif
......@@ -330,6 +323,4 @@ BINDIR = $(OUTPUTDIR)/bin$(ISA_DIR)
# Absolute path to output directory
ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
# Get shared compiler settings
include $(BUILDDIR)/common/shared/Compiler.gmk
......@@ -58,19 +58,10 @@ PLATFORM_SHARED=done
# ARCH sparc, sparcv9, i586, amd64, or ia64
# ARCH_FAMILY sparc or i586
# ARCHPROP sparc or x86
# ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc.
# LIBARCH sparc, sparcv9, i386, amd64, or ia64
# DEV_NULL destination of /dev/null, NUL or /dev/NULL
# CLASSPATH_SEPARATOR separator in classpath, ; or :
# LIB_PREFIX dynamic or static library prefix, lib or empty
# LIB_SUFFIX static library file suffix, .lib or .a?
# LIBRARY_SUFFIX dynamic library file suffix, .dll or .so
# OBJECT_SUFFIX object file suffix, .o or .obj
# EXE_SUFFIX executable file suffix, .exe or empty
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
# ISA_DIR solaris only: /sparcv9 or /amd64
# LIBARCH32 solaris only: sparc or i386
# LIBARCH64 solaris only: sparcv9 or amd64
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
# USING_CYGWIN windows only: true or false
......@@ -129,7 +120,6 @@ ifeq ($(SYSTEM_UNAME), SunOS)
# Need to maintain the jre/lib/i386 location for 32-bit Intel
ifeq ($(ARCH), i586)
ARCH_FAMILY = $(ARCH)
LIBARCH = i386
# Value of Java os.arch property
ARCHPROP = x86
else
......@@ -138,17 +128,8 @@ ifeq ($(SYSTEM_UNAME), SunOS)
else
ARCH_FAMILY = sparc
endif
LIBARCH = $(ARCH)
# Value of Java os.arch property
ARCHPROP = $(LIBARCH)
endif
# The two LIBARCH names
ifeq ($(ARCH_FAMILY), sparc)
LIBARCH32 = sparc
LIBARCH64 = sparcv9
else
LIBARCH32 = i386
LIBARCH64 = amd64
ARCHPROP = $(ARCH)
endif
# Suffix for file bundles used in previous release
BUNDLE_FILE_SUFFIX=.tar
......@@ -218,16 +199,12 @@ ifeq ($(SYSTEM_UNAME), Linux)
endif
endif
# Need to maintain the jre/lib/i386 location for 32-bit Intel
ifeq ($(ARCH), i586)
LIBARCH = i386
ARCHPROP = i386
else
LIBARCH = $(ARCH)
ARCHPROP = $(ARCH)
endif
# Value of Java os.arch property
ARCHPROP = $(LIBARCH)
# Suffix for file bundles used in previous release
BUNDLE_FILE_SUFFIX=.tar.gz
# Minimum disk space needed as determined by running 'du -sk' on
......@@ -303,9 +280,7 @@ ifeq ($(PLATFORM), windows)
endif
endif
export ARCH_DATA_MODEL
# LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
ARCH=i586
LIBARCH=i386
# Value of Java os.arch property
ARCHPROP=x86
REQUIRED_WINDOWS_NAME=Windows Professional 2000
......@@ -323,9 +298,8 @@ ifeq ($(PLATFORM), windows)
ARCH=ia64
endif
endif
LIBARCH=$(ARCH)
# Value of Java os.arch property
ARCHPROP=$(LIBARCH)
ARCHPROP=$(ARCH)
endif
ARCH_FAMILY = $(ARCH)
# Where is unwanted output to be delivered?
......@@ -337,14 +311,6 @@ ifeq ($(PLATFORM), windows)
export DEV_NULL
# Classpath separator
CLASSPATH_SEPARATOR = ;
# The suffix used for object file (.o for unix .obj for windows)
OBJECT_SUFFIX = obj
# The suffix applied to executables (.exe for windows, nothing for solaris)
EXE_SUFFIX = .exe
# The prefix applied to library files (lib for solaris, nothing for windows)
LIB_PREFIX=
LIBRARY_SUFFIX = dll
LIB_SUFFIX = lib
# User name determination (set _USER)
ifndef USER
ifdef USERNAME
......@@ -359,8 +325,6 @@ ifeq ($(PLATFORM), windows)
else
_USER:=$(USER)
endif
# Location of client/server directories
ARCH_VM_SUBDIR=jre/bin
# Suffix for file bundles used in previous release
BUNDLE_FILE_SUFFIX=.tar
# Minimum disk space needed as determined by running 'du -sk' on
......@@ -430,16 +394,6 @@ ifneq ($(PLATFORM), windows)
export DEV_NULL
# Character used between entries in classpath
CLASSPATH_SEPARATOR = :
# suffix used for object file (.o for unix .obj for windows)
OBJECT_SUFFIX = o
# The suffix applied to runtime libraries
LIBRARY_SUFFIX = so
# The suffix applied to link libraries
LIB_SUFFIX = so
# The suffix applied to executables (.exe for windows, nothing for solaris)
EXE_SUFFIX =
# The prefix applied to library files (lib for solaris, nothing for windows)
LIB_PREFIX = lib
# User name determination (set _USER)
ifndef USER
ifdef LOGNAME
......@@ -450,8 +404,6 @@ ifneq ($(PLATFORM), windows)
else
_USER:=$(USER)
endif
# Location of client/server directories
ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
endif
# If blanks in the username, use the first 4 words and pack them together
......
......@@ -32,12 +32,6 @@ PACKAGE = com.sun.tools.corba.se.idl
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
# This program must contain a manifest that defines the execution level
# needed to follow standard Vista User Access Control Guidelines
# This must be set before Program.gmk is included
#
BUILD_MANIFEST=true
#
# Files
#
......
......@@ -120,3 +120,4 @@ bf496cbe9b74dda5975a1559da7ecfdd313e509e jdk7-b107
e44a93947ccbfce712b51725f313163606f15486 jdk7-b108
cc4bb3022b3144dc5db0805b9ef6c7eff2aa3b81 jdk7-b109
2f25f2b8de2700a1822463b1bd3d02b5e218018f jdk7-b110
07b042e13dde4f3479ba9ec55120fcd5e8623323 jdk7-b111
......@@ -1037,7 +1037,7 @@ public class CommandProcessor {
public void prologue(Address start, Address end) {
}
public void visit(CodeBlob blob) {
fout.println(gen.genHTML(blob.instructionsBegin()));
fout.println(gen.genHTML(blob.contentBegin()));
}
public void epilogue() {
}
......
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -54,7 +54,7 @@ public class Runtime1 {
/** FIXME: consider making argument "type-safe" in Java port */
public Address entryFor(int id) {
return blobFor(id).instructionsBegin();
return blobFor(id).codeBegin();
}
/** FIXME: consider making argument "type-safe" in Java port */
......
/*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -39,7 +39,8 @@ public class CodeBlob extends VMObject {
private static CIntegerField sizeField;
private static CIntegerField headerSizeField;
private static CIntegerField relocationSizeField;
private static CIntegerField instructionsOffsetField;
private static CIntegerField contentOffsetField;
private static CIntegerField codeOffsetField;
private static CIntegerField frameCompleteOffsetField;
private static CIntegerField dataOffsetField;
private static CIntegerField frameSizeField;
......@@ -68,7 +69,8 @@ public class CodeBlob extends VMObject {
headerSizeField = type.getCIntegerField("_header_size");
relocationSizeField = type.getCIntegerField("_relocation_size");
frameCompleteOffsetField = type.getCIntegerField("_frame_complete_offset");
instructionsOffsetField = type.getCIntegerField("_instructions_offset");
contentOffsetField = type.getCIntegerField("_content_offset");
codeOffsetField = type.getCIntegerField("_code_offset");
dataOffsetField = type.getCIntegerField("_data_offset");
frameSizeField = type.getCIntegerField("_frame_size");
oopMapsField = type.getAddressField("_oop_maps");
......@@ -111,11 +113,19 @@ public class CodeBlob extends VMObject {
// public RelocInfo relocationBegin();
// public RelocInfo relocationEnd();
public Address instructionsBegin() {
return headerBegin().addOffsetTo(instructionsOffsetField.getValue(addr));
public Address contentBegin() {
return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
}
public Address instructionsEnd() {
public Address contentEnd() {
return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
}
public Address codeBegin() {
return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
}
public Address codeEnd() {
return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
}
......@@ -128,24 +138,27 @@ public class CodeBlob extends VMObject {
}
// Offsets
public int getRelocationOffset() { return (int) headerSizeField.getValue(addr); }
public int getInstructionsOffset() { return (int) instructionsOffsetField.getValue(addr); }
public int getDataOffset() { return (int) dataOffsetField.getValue(addr); }
public int getRelocationOffset() { return (int) headerSizeField .getValue(addr); }
public int getContentOffset() { return (int) contentOffsetField.getValue(addr); }
public int getCodeOffset() { return (int) codeOffsetField .getValue(addr); }
public int getDataOffset() { return (int) dataOffsetField .getValue(addr); }
// Sizes
public int getSize() { return (int) sizeField.getValue(addr); }
public int getHeaderSize() { return (int) headerSizeField.getValue(addr); }
public int getSize() { return (int) sizeField .getValue(addr); }
public int getHeaderSize() { return (int) headerSizeField.getValue(addr); }
// FIXME: add getRelocationSize()
public int getInstructionsSize() { return (int) instructionsEnd().minus(instructionsBegin()); }
public int getDataSize() { return (int) dataEnd().minus(dataBegin()); }
public int getContentSize() { return (int) contentEnd().minus(contentBegin()); }
public int getCodeSize() { return (int) codeEnd() .minus(codeBegin()); }
public int getDataSize() { return (int) dataEnd() .minus(dataBegin()); }
// Containment
public boolean blobContains(Address addr) { return headerBegin().lessThanOrEqual(addr) && dataEnd().greaterThan(addr); }
public boolean blobContains(Address addr) { return headerBegin() .lessThanOrEqual(addr) && dataEnd() .greaterThan(addr); }
// FIXME: add relocationContains
public boolean instructionsContains(Address addr) { return instructionsBegin().lessThanOrEqual(addr) && instructionsEnd().greaterThan(addr); }
public boolean dataContains(Address addr) { return dataBegin().lessThanOrEqual(addr) && dataEnd().greaterThan(addr); }
public boolean contains(Address addr) { return instructionsContains(addr); }
public boolean isFrameCompleteAt(Address a) { return instructionsContains(a) && a.minus(instructionsBegin()) >= frameCompleteOffsetField.getValue(addr); }
public boolean contentContains(Address addr) { return contentBegin().lessThanOrEqual(addr) && contentEnd().greaterThan(addr); }
public boolean codeContains(Address addr) { return codeBegin() .lessThanOrEqual(addr) && codeEnd() .greaterThan(addr); }
public boolean dataContains(Address addr) { return dataBegin() .lessThanOrEqual(addr) && dataEnd() .greaterThan(addr); }
public boolean contains(Address addr) { return contentContains(addr); }
public boolean isFrameCompleteAt(Address a) { return codeContains(a) && a.minus(codeBegin()) >= frameCompleteOffsetField.getValue(addr); }
// Reclamation support (really only used by the nmethods, but in order to get asserts to work
// in the CodeCache they are defined virtual here)
......@@ -168,7 +181,7 @@ public class CodeBlob extends VMObject {
if (Assert.ASSERTS_ENABLED) {
Assert.that(getOopMaps() != null, "nope");
}
return getOopMaps().findMapAtOffset(pc.minus(instructionsBegin()), debugging);
return getOopMaps().findMapAtOffset(pc.minus(codeBegin()), debugging);
}
// virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, void f(oop*)) { ShouldNotReachHere(); }
......@@ -200,7 +213,8 @@ public class CodeBlob extends VMObject {
}
protected void printComponentsOn(PrintStream tty) {
tty.println(" instructions: [" + instructionsBegin() + ", " + instructionsEnd() + "), " +
tty.println(" content: [" + contentBegin() + ", " + contentEnd() + "), " +
" code: [" + codeBegin() + ", " + codeEnd() + "), " +
" data: [" + dataBegin() + ", " + dataEnd() + "), " +
" frame size: " + getFrameSize());
}
......
......@@ -134,10 +134,10 @@ public class NMethod extends CodeBlob {
public boolean isOSRMethod() { return getEntryBCI() != VM.getVM().getInvocationEntryBCI(); }
/** Boundaries for different parts */
public Address constantsBegin() { return instructionsBegin(); }
public Address constantsBegin() { return contentBegin(); }
public Address constantsEnd() { return getEntryPoint(); }
public Address codeBegin() { return getEntryPoint(); }
public Address codeEnd() { return headerBegin().addOffsetTo(getStubOffset()); }
public Address instsBegin() { return codeBegin(); }
public Address instsEnd() { return headerBegin().addOffsetTo(getStubOffset()); }
public Address exceptionBegin() { return headerBegin().addOffsetTo(getExceptionOffset()); }
public Address deoptBegin() { return headerBegin().addOffsetTo(getDeoptOffset()); }
public Address stubBegin() { return headerBegin().addOffsetTo(getStubOffset()); }
......@@ -156,7 +156,7 @@ public class NMethod extends CodeBlob {
public Address nulChkTableEnd() { return headerBegin().addOffsetTo(getNMethodEndOffset()); }
public int constantsSize() { return (int) constantsEnd() .minus(constantsBegin()); }
public int codeSize() { return (int) codeEnd() .minus(codeBegin()); }
public int instsSize() { return (int) instsEnd() .minus(instsBegin()); }
public int stubSize() { return (int) stubEnd() .minus(stubBegin()); }
public int oopsSize() { return (int) oopsEnd() .minus(oopsBegin()); }
public int scopesDataSize() { return (int) scopesDataEnd() .minus(scopesDataBegin()); }
......@@ -169,7 +169,7 @@ public class NMethod extends CodeBlob {
public int totalSize() {
return
constantsSize() +
codeSize() +
instsSize() +
stubSize() +
scopesDataSize() +
scopesPCsSize() +
......@@ -179,7 +179,7 @@ public class NMethod extends CodeBlob {
}
public boolean constantsContains (Address addr) { return constantsBegin() .lessThanOrEqual(addr) && constantsEnd() .greaterThan(addr); }
public boolean codeContains (Address addr) { return codeBegin() .lessThanOrEqual(addr) && codeEnd() .greaterThan(addr); }
public boolean instsContains (Address addr) { return instsBegin() .lessThanOrEqual(addr) && instsEnd() .greaterThan(addr); }
public boolean stubContains (Address addr) { return stubBegin() .lessThanOrEqual(addr) && stubEnd() .greaterThan(addr); }
public boolean oopsContains (Address addr) { return oopsBegin() .lessThanOrEqual(addr) && oopsEnd() .greaterThan(addr); }
public boolean scopesDataContains (Address addr) { return scopesDataBegin() .lessThanOrEqual(addr) && scopesDataEnd() .greaterThan(addr); }
......@@ -353,7 +353,8 @@ public class NMethod extends CodeBlob {
protected void printComponentsOn(PrintStream tty) {
// FIXME: add relocation information
tty.println(" instructions: [" + instructionsBegin() + ", " + instructionsEnd() + "), " +
tty.println(" content: [" + contentBegin() + ", " + contentEnd() + "), " +
" code: [" + codeBegin() + ", " + codeEnd() + "), " +
" data: [" + dataBegin() + ", " + dataEnd() + "), " +
" oops: [" + oopsBegin() + ", " + oopsEnd() + "), " +
" frame size: " + getFrameSize());
......
/*
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -75,7 +75,7 @@ public class PCDesc extends VMObject {
}
public Address getRealPC(NMethod code) {
return code.instructionsBegin().addOffsetTo(getPCOffset());
return code.codeBegin().addOffsetTo(getPCOffset());
}
......
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -190,11 +190,11 @@ public class FindInCodeCachePanel extends SAPanel {
private void reportResult(StringBuffer result, CodeBlob blob) {
result.append("<a href='blob:");
result.append(blob.instructionsBegin().toString());
result.append(blob.contentBegin().toString());
result.append("'>");
result.append(blob.getName());
result.append("@");
result.append(blob.instructionsBegin());
result.append(blob.contentBegin());
result.append("</a><br>");
}
......
......@@ -1415,13 +1415,13 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
buf.append(genMethodAndKlassLink(nmethod.getMethod()));
buf.h3("Compiled Code");
sun.jvm.hotspot.debugger.Address codeBegin = nmethod.codeBegin();
sun.jvm.hotspot.debugger.Address codeEnd = nmethod.codeEnd();
final int codeSize = (int)codeEnd.minus(codeBegin);
final long startPc = addressToLong(codeBegin);
final byte[] code = new byte[codeSize];
sun.jvm.hotspot.debugger.Address instsBegin = nmethod.instsBegin();
sun.jvm.hotspot.debugger.Address instsEnd = nmethod.instsEnd();
final int instsSize = nmethod.instsSize();
final long startPc = addressToLong(instsBegin);
final byte[] code = new byte[instsSize];
for (int i=0; i < code.length; i++)
code[i] = codeBegin.getJByteAt(i);
code[i] = instsBegin.getJByteAt(i);
final long verifiedEntryPoint = addressToLong(nmethod.getVerifiedEntryPoint());
final long entryPoint = addressToLong(nmethod.getEntryPoint());
......@@ -1499,8 +1499,8 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
buf.h3("CodeBlob");
buf.h3("Compiled Code");
final sun.jvm.hotspot.debugger.Address codeBegin = blob.instructionsBegin();
final int codeSize = blob.getInstructionsSize();
final sun.jvm.hotspot.debugger.Address codeBegin = blob.codeBegin();
final int codeSize = blob.getCodeSize();
final long startPc = addressToLong(codeBegin);
final byte[] code = new byte[codeSize];
for (int i=0; i < code.length; i++)
......
......@@ -96,15 +96,15 @@ public class PointerFinder {
if (Assert.ASSERTS_ENABLED) {
Assert.that(loc.blob != null, "Should have found CodeBlob");
}
loc.inBlobInstructions = loc.blob.instructionsContains(a);
loc.inBlobData = loc.blob.dataContains(a);
loc.inBlobCode = loc.blob.codeContains(a);
loc.inBlobData = loc.blob.dataContains(a);
if (loc.blob.isNMethod()) {
NMethod nm = (NMethod) loc.blob;
loc.inBlobOops = nm.oopsContains(a);
}
loc.inBlobUnknownLocation = (!(loc.inBlobInstructions ||
loc.inBlobUnknownLocation = (!(loc.inBlobCode ||
loc.inBlobData ||
loc.inBlobOops));
return loc;
......
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -65,7 +65,7 @@ public class PointerLocation {
InterpreterCodelet interpreterCodelet;
CodeBlob blob;
// FIXME: add more detail about CodeBlob
boolean inBlobInstructions;
boolean inBlobCode;
boolean inBlobData;
boolean inBlobOops;
boolean inBlobUnknownLocation;
......@@ -142,8 +142,8 @@ public class PointerLocation {
return blob;
}
public boolean isInBlobInstructions() {
return inBlobInstructions;
public boolean isInBlobCode() {
return inBlobCode;
}
public boolean isInBlobData() {
......@@ -233,8 +233,8 @@ public class PointerLocation {
} else if (isInCodeCache()) {
CodeBlob b = getCodeBlob();
tty.print("In ");
if (isInBlobInstructions()) {
tty.print("instructions");
if (isInBlobCode()) {
tty.print("code");
} else if (isInBlobData()) {
tty.print("data");
} else if (isInBlobOops()) {
......
......@@ -33,9 +33,9 @@
# Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2010
HS_MAJOR_VER=19
HS_MAJOR_VER=20
HS_MINOR_VER=0
HS_BUILD_NUMBER=06
HS_BUILD_NUMBER=01
JDK_MAJOR_VER=1
JDK_MINOR_VER=7
......
......@@ -47,6 +47,8 @@ jprt.sync.push=false
# Define the Solaris platforms we want for the various releases
jprt.my.solaris.sparc.jdk7=solaris_sparc_5.10
jprt.my.solaris.sparc.jdk7b107=solaris_sparc_5.10
jprt.my.solaris.sparc.jdk7temp=solaris_sparc_5.10
jprt.my.solaris.sparc.jdk6=solaris_sparc_5.8
jprt.my.solaris.sparc.jdk6perf=solaris_sparc_5.8
jprt.my.solaris.sparc.jdk6u10=solaris_sparc_5.8
......@@ -56,6 +58,8 @@ jprt.my.solaris.sparc.jdk6u20=solaris_sparc_5.8
jprt.my.solaris.sparc=${jprt.my.solaris.sparc.${jprt.tools.default.release}}
jprt.my.solaris.sparcv9.jdk7=solaris_sparcv9_5.10
jprt.my.solaris.sparcv9.jdk7b107=solaris_sparcv9_5.10
jprt.my.solaris.sparcv9.jdk7temp=solaris_sparcv9_5.10
jprt.my.solaris.sparcv9.jdk6=solaris_sparcv9_5.8
jprt.my.solaris.sparcv9.jdk6perf=solaris_sparcv9_5.8
jprt.my.solaris.sparcv9.jdk6u10=solaris_sparcv9_5.8
......@@ -65,6 +69,8 @@ jprt.my.solaris.sparcv9.jdk6u20=solaris_sparcv9_5.8
jprt.my.solaris.sparcv9=${jprt.my.solaris.sparcv9.${jprt.tools.default.release}}
jprt.my.solaris.i586.jdk7=solaris_i586_5.10
jprt.my.solaris.i586.jdk7b107=solaris_i586_5.10
jprt.my.solaris.i586.jdk7temp=solaris_i586_5.10
jprt.my.solaris.i586.jdk6=solaris_i586_5.8
jprt.my.solaris.i586.jdk6perf=solaris_i586_5.8
jprt.my.solaris.i586.jdk6u10=solaris_i586_5.8
......@@ -74,6 +80,8 @@ jprt.my.solaris.i586.jdk6u20=solaris_i586_5.8
jprt.my.solaris.i586=${jprt.my.solaris.i586.${jprt.tools.default.release}}
jprt.my.solaris.x64.jdk7=solaris_x64_5.10
jprt.my.solaris.x64.jdk7b107=solaris_x64_5.10
jprt.my.solaris.x64.jdk7temp=solaris_x64_5.10
jprt.my.solaris.x64.jdk6=solaris_x64_5.10
jprt.my.solaris.x64.jdk6perf=solaris_x64_5.10
jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
......@@ -83,6 +91,8 @@ jprt.my.solaris.x64.jdk6u20=solaris_x64_5.10
jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
jprt.my.linux.i586.jdk7=linux_i586_2.6
jprt.my.linux.i586.jdk7b107=linux_i586_2.6
jprt.my.linux.i586.jdk7temp=linux_i586_2.6
jprt.my.linux.i586.jdk6=linux_i586_2.4
jprt.my.linux.i586.jdk6perf=linux_i586_2.4
jprt.my.linux.i586.jdk6u10=linux_i586_2.4
......@@ -92,6 +102,8 @@ jprt.my.linux.i586.jdk6u20=linux_i586_2.4
jprt.my.linux.i586=${jprt.my.linux.i586.${jprt.tools.default.release}}
jprt.my.linux.x64.jdk7=linux_x64_2.6
jprt.my.linux.x64.jdk7b107=linux_x64_2.6
jprt.my.linux.x64.jdk7temp=linux_x64_2.6
jprt.my.linux.x64.jdk6=linux_x64_2.4
jprt.my.linux.x64.jdk6perf=linux_x64_2.4
jprt.my.linux.x64.jdk6u10=linux_x64_2.4
......@@ -100,7 +112,9 @@ jprt.my.linux.x64.jdk6u18=linux_x64_2.4
jprt.my.linux.x64.jdk6u20=linux_x64_2.4
jprt.my.linux.x64=${jprt.my.linux.x64.${jprt.tools.default.release}}
jprt.my.windows.i586.jdk7=windows_i586_5.0
jprt.my.windows.i586.jdk7=windows_i586_5.1
jprt.my.windows.i586.jdk7b107=windows_i586_5.0
jprt.my.windows.i586.jdk7temp=windows_i586_5.0
jprt.my.windows.i586.jdk6=windows_i586_5.0
jprt.my.windows.i586.jdk6perf=windows_i586_5.0
jprt.my.windows.i586.jdk6u10=windows_i586_5.0
......@@ -110,6 +124,8 @@ jprt.my.windows.i586.jdk6u20=windows_i586_5.0
jprt.my.windows.i586=${jprt.my.windows.i586.${jprt.tools.default.release}}
jprt.my.windows.x64.jdk7=windows_x64_5.2
jprt.my.windows.x64.jdk7b107=windows_x64_5.2
jprt.my.windows.x64.jdk7temp=windows_x64_5.2
jprt.my.windows.x64.jdk6=windows_x64_5.2
jprt.my.windows.x64.jdk6perf=windows_x64_5.2
jprt.my.windows.x64.jdk6u10=windows_x64_5.2
......
......@@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
#
# This makefile creates a build tree and lights off a build.
......@@ -45,13 +45,13 @@
#
# make REMOTE="rsh -l me myotherlinuxbox"
# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
# JDI binding on SA produces two binaries:
# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
# JDI binding on SA produces two binaries:
# 1. sa-jdi.jar - This is build before building libjvm[_g].so
# Please refer to ./makefiles/sa.make
# 2. libsa[_g].so - Native library for SA - This is built after
# libjsig[_g].so (signal interposition library)
# Please refer to ./makefiles/vm.make
# Please refer to ./makefiles/vm.make
# If $(GAMMADIR)/agent dir is not present, SA components are not built.
ifeq ($(GAMMADIR),)
......@@ -61,11 +61,9 @@ include $(GAMMADIR)/make/defs.make
endif
include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
ifndef LP64
ifndef CC_INTERP
FORCE_TIERED=1
endif
endif
ifdef LP64
ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
......
#
# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -48,6 +48,9 @@ MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
AGENT_FILES1 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
AGENT_FILES2 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2))
AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list
AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list
SA_CLASSDIR = $(GENERATED)/saclasses
SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
......@@ -79,10 +82,24 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
$(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
mkdir -p $(SA_CLASSDIR); \
fi
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
# Note: When indented, make tries to execute the '$(shell' comment.
# In some environments, cmd processors have limited line length.
# To prevent the javac invocation in the next block from using
# a very long cmd line, we use javac's @file-list option. We
# generate the file lists using make's built-in 'foreach' control
# flow which also avoids cmd processor line length issues. Since
# the 'foreach' is done as part of make's macro expansion phase,
# the initialization of the lists is also done in the same phase
# using '$(shell rm ...' instead of using the more traditional
# 'rm ...' rule.
$(shell rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST))
$(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST)))
$(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST)))
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST)
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST)
$(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
......@@ -101,3 +118,4 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
clean:
rm -rf $(SA_CLASSDIR)
rm -rf $(GENERATED)/sa-jdi.jar
rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
#
# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
#
# This makefile creates a build tree and lights off a build.
......@@ -36,13 +36,13 @@
# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc.
# from the PATH.
# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
# JDI binding on SA produces two binaries:
# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
# JDI binding on SA produces two binaries:
# 1. sa-jdi.jar - This is build before building libjvm[_g].so
# Please refer to ./makefiles/sa.make
# 2. libsaproc[_g].so - Native library for SA - This is built after
# libjsig[_g].so (signal interposition library)
# Please refer to ./makefiles/vm.make
# Please refer to ./makefiles/vm.make
# If $(GAMMADIR)/agent dir is not present, SA components are not built.
ifeq ($(GAMMADIR),)
......@@ -52,11 +52,9 @@ include $(GAMMADIR)/make/defs.make
endif
include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
ifndef LP64
ifndef CC_INTERP
FORCE_TIERED=1
endif
endif
ifdef LP64
ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
......
......@@ -165,7 +165,7 @@ $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
$(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
@echo Compiling $(DTRACE).d
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -o $@ -s $(DTRACE).d \
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
$(DTraced_Files) ||\
STATUS=$$?;\
if [ x"$$STATUS" = x"1" -a \
......
此差异已折叠。
#
# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -44,6 +44,9 @@ MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
AGENT_FILES1 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
AGENT_FILES2 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2))
AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list
AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list
SA_CLASSDIR = $(GENERATED)/saclasses
SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
......@@ -70,8 +73,23 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
$(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
mkdir -p $(SA_CLASSDIR); \
fi
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
# Note: When indented, make tries to execute the '$(shell' comment.
# In some environments, cmd processors have limited line length.
# To prevent the javac invocation in the next block from using
# a very long cmd line, we use javac's @file-list option. We
# generate the file lists using make's built-in 'foreach' control
# flow which also avoids cmd processor line length issues. Since
# the 'foreach' is done as part of make's macro expansion phase,
# the initialization of the lists is also done in the same phase
# using '$(shell rm ...' instead of using the more traditional
# 'rm ...' rule.
$(shell rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST))
$(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST)))
$(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST)))
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST)
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST)
$(QUIETLY) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
......@@ -88,3 +106,4 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
clean:
rm -rf $(SA_CLASSDIR)
rm -rf $(GENERATED)/sa-jdi.jar
rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
Copyright %YEARS% Oracle and/or its affiliates. All rights reserved.
Copyright (c) %YEARS%, Oracle and/or its affiliates. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
......
Copyright %YEARS% Oracle and/or its affiliates. All rights reserved.
Copyright (c) %YEARS%, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
......
Copyright %YEARS% Oracle and/or its affiliates. All rights reserved.
Copyright (c) %YEARS%, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
......
#
# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -19,7 +19,7 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
#
# Note: this makefile is invoked both from build.bat and from the J2SE
......@@ -72,13 +72,11 @@ BUILDARCH=ia64
!endif
!endif
!if "$(BUILDARCH)" != "amd64"
!if "$(BUILDARCH)" != "ia64"
!ifndef CC_INTERP
FORCE_TIERED=1
!endif
!endif
!endif
!if "$(BUILDARCH)" == "amd64"
Platform_arch=x86
......@@ -135,7 +133,7 @@ VARIANT_TEXT=Kernel
# We can have update versions like "01a", but Windows requires
# we use only integers in the file version field. So:
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
#
#
JDK_UPDATE_VER=0
JDK_BUILD_NUMBER=0
......@@ -148,7 +146,7 @@ HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
# 1.6.0_01a-b02 will be 6.0.11.2
#
# JDK_* variables are defined in make/hotspot_version or on command line
#
#
JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)
JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)
!if "$(JRE_RELEASE_VERSION)" == ""
......@@ -162,7 +160,7 @@ JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)
# Hotspot Express VM FileVersion:
# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers).
#
#
# HS_* variables are defined in make/hotspot_version
#
HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER)
......@@ -182,7 +180,7 @@ HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
# We don't support SA on ia64, and we can't
# build it if we are using a version of Vis Studio
# build it if we are using a version of Vis Studio
# older than .Net 2003.
# SA_INCLUDE and SA_LIB are hold-overs from a previous
# implementation in which we could build SA using
......
......@@ -4192,7 +4192,7 @@ static void check_index(int ind) {
static void generate_satb_log_enqueue(bool with_frame) {
BufferBlob* bb = BufferBlob::create("enqueue_with_frame", EnqueueCodeSize);
CodeBuffer buf(bb->instructions_begin(), bb->instructions_size());
CodeBuffer buf(bb);
MacroAssembler masm(&buf);
address start = masm.pc();
Register pre_val;
......@@ -4421,7 +4421,7 @@ static u_char* dirty_card_log_enqueue_end = 0;
// This gets to assume that o0 contains the object address.
static void generate_dirty_card_log_enqueue(jbyte* byte_map_base) {
BufferBlob* bb = BufferBlob::create("dirty_card_enqueue", EnqueueCodeSize*2);
CodeBuffer buf(bb->instructions_begin(), bb->instructions_size());
CodeBuffer buf(bb);
MacroAssembler masm(&buf);
address start = masm.pc();
......
......@@ -57,13 +57,12 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
#endif
}
#ifdef TIERED
void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
__ bind(_entry);
__ set(_bci, G4);
__ call(Runtime1::entry_for(Runtime1::counter_overflow_id), relocInfo::runtime_call_type);
__ delayed()->nop();
__ delayed()->mov_or_nop(_method->as_register(), G5);
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
......@@ -71,7 +70,6 @@ void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
__ delayed()->nop();
}
#endif // TIERED
void DivByZeroStub::emit_code(LIR_Assembler* ce) {
if (_offset != -1) {
......
......@@ -73,6 +73,7 @@ FloatRegister FrameMap::_fpu_regs [FrameMap::nof_fpu_regs];
// some useful constant RInfo's:
LIR_Opr FrameMap::in_long_opr;
LIR_Opr FrameMap::out_long_opr;
LIR_Opr FrameMap::g1_long_single_opr;
LIR_Opr FrameMap::F0_opr;
LIR_Opr FrameMap::F0_double_opr;
......@@ -238,6 +239,7 @@ void FrameMap::initialize() {
in_long_opr = as_long_opr(I0);
out_long_opr = as_long_opr(O0);
g1_long_single_opr = as_long_single_opr(G1);
G0_opr = as_opr(G0);
G1_opr = as_opr(G1);
......
......@@ -103,6 +103,7 @@
static LIR_Opr in_long_opr;
static LIR_Opr out_long_opr;
static LIR_Opr g1_long_single_opr;
static LIR_Opr F0_opr;
static LIR_Opr F0_double_opr;
......@@ -113,18 +114,25 @@
private:
static FloatRegister _fpu_regs [nof_fpu_regs];
static LIR_Opr as_long_single_opr(Register r) {
return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
}
static LIR_Opr as_long_pair_opr(Register r) {
return LIR_OprFact::double_cpu(cpu_reg2rnr(r->successor()), cpu_reg2rnr(r));
}
public:
#ifdef _LP64
static LIR_Opr as_long_opr(Register r) {
return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
return as_long_single_opr(r);
}
static LIR_Opr as_pointer_opr(Register r) {
return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
return as_long_single_opr(r);
}
#else
static LIR_Opr as_long_opr(Register r) {
return LIR_OprFact::double_cpu(cpu_reg2rnr(r->successor()), cpu_reg2rnr(r));
return as_long_pair_opr(r);
}
static LIR_Opr as_pointer_opr(Register r) {
return as_opr(r);
......
/*
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -71,9 +71,16 @@
static bool is_single_instruction(LIR_Op* op);
// Record the type of the receiver in ReceiverTypeData
void type_profile_helper(Register mdo, int mdo_offset_bias,
ciMethodData *md, ciProfileData *data,
Register recv, Register tmp1, Label* update_done);
// Setup pointers to MDO, MDO slot, also compute offset bias to access the slot.
void setup_md_access(ciMethod* method, int bci,
ciMethodData*& md, ciProfileData*& data, int& mdo_offset_bias);
public:
void pack64( Register rs, Register rd );
void unpack64( Register rd );
void pack64(LIR_Opr src, LIR_Opr dst);
void unpack64(LIR_Opr src, LIR_Opr dst);
enum {
#ifdef _LP64
......
/*
* Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -227,29 +227,37 @@ LIR_Address* LIRGenerator::emit_array_address(LIR_Opr array_opr, LIR_Opr index_o
}
}
LIR_Opr LIRGenerator::load_immediate(int x, BasicType type) {
LIR_Opr r;
if (type == T_LONG) {
r = LIR_OprFact::longConst(x);
} else if (type == T_INT) {
r = LIR_OprFact::intConst(x);
} else {
ShouldNotReachHere();
}
if (!Assembler::is_simm13(x)) {
LIR_Opr tmp = new_register(type);
__ move(r, tmp);
return tmp;
}
return r;
}
void LIRGenerator::increment_counter(address counter, int step) {
void LIRGenerator::increment_counter(address counter, BasicType type, int step) {
LIR_Opr pointer = new_pointer_register();
__ move(LIR_OprFact::intptrConst(counter), pointer);
LIR_Address* addr = new LIR_Address(pointer, T_INT);
LIR_Address* addr = new LIR_Address(pointer, type);
increment_counter(addr, step);
}
void LIRGenerator::increment_counter(LIR_Address* addr, int step) {
LIR_Opr temp = new_register(T_INT);
LIR_Opr temp = new_register(addr->type());
__ move(addr, temp);
LIR_Opr c = LIR_OprFact::intConst(step);
if (Assembler::is_simm13(step)) {
__ add(temp, c, temp);
} else {
LIR_Opr temp2 = new_register(T_INT);
__ move(c, temp2);
__ add(temp, temp2, temp);
}
__ add(temp, load_immediate(step, addr->type()), temp);
__ move(temp, addr);
}
void LIRGenerator::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
LIR_Opr o7opr = FrameMap::O7_opr;
__ load(new LIR_Address(base, disp, T_INT), o7opr, info);
......@@ -611,7 +619,6 @@ void LIRGenerator::do_CompareOp(CompareOp* x) {
left.load_item();
right.load_item();
LIR_Opr reg = rlock_result(x);
if (x->x()->type()->is_float_kind()) {
Bytecodes::Code code = x->op();
__ fcmp2int(left.result(), right.result(), reg, (code == Bytecodes::_fcmpl || code == Bytecodes::_dcmpl));
......@@ -1040,7 +1047,9 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
LIR_Opr tmp1 = FrameMap::G1_oop_opr;
LIR_Opr tmp2 = FrameMap::G3_oop_opr;
LIR_Opr tmp3 = FrameMap::G4_oop_opr;
__ instanceof(out_reg, obj.result(), x->klass(), tmp1, tmp2, tmp3, x->direct_compare(), patching_info);
__ instanceof(out_reg, obj.result(), x->klass(), tmp1, tmp2, tmp3,
x->direct_compare(), patching_info,
x->profiled_method(), x->profiled_bci());
}
......@@ -1089,12 +1098,12 @@ void LIRGenerator::do_If(If* x) {
// add safepoint before generating condition code so it can be recomputed
if (x->is_safepoint()) {
// increment backedge counter if needed
increment_backedge_counter(state_for(x, x->state_before()));
increment_backedge_counter(state_for(x, x->state_before()), x->profiled_bci());
__ safepoint(new_register(T_INT), state_for(x, x->state_before()));
}
__ cmp(lir_cond(cond), left, right);
// Generate branch profiling. Profiling code doesn't kill flags.
profile_branch(x, cond);
move_to_phi(x->state());
if (x->x()->type()->is_float_kind()) {
......
......@@ -465,12 +465,10 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
break;
#ifdef TIERED
case counter_overflow_id:
// G4 contains bci
oop_maps = generate_stub_call(sasm, noreg, CAST_FROM_FN_PTR(address, counter_overflow), G4);
// G4 contains bci, G5 contains method
oop_maps = generate_stub_call(sasm, noreg, CAST_FROM_FN_PTR(address, counter_overflow), G4, G5);
break;
#endif // TIERED
case new_type_array_id:
case new_object_array_id:
......
/*
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -34,14 +34,7 @@ define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, UseOnStackReplacement, true );
define_pd_global(bool, TieredCompilation, false);
define_pd_global(intx, CompileThreshold, 1000 ); // Design center runs on 1.3.1
define_pd_global(intx, Tier2CompileThreshold, 1500 );
define_pd_global(intx, Tier3CompileThreshold, 2000 );
define_pd_global(intx, Tier4CompileThreshold, 2500 );
define_pd_global(intx, BackEdgeThreshold, 100000);
define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
define_pd_global(intx, OnStackReplacePercentage, 1400 );
define_pd_global(bool, UseTLAB, true );
......
/*
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -37,21 +37,8 @@ define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(bool, ProfileInterpreter, true);
#endif // CC_INTERP
define_pd_global(bool, TieredCompilation, false);
#ifdef TIERED
define_pd_global(intx, CompileThreshold, 1000);
define_pd_global(intx, BackEdgeThreshold, 14000);
#else
define_pd_global(intx, CompileThreshold, 10000);
define_pd_global(intx, BackEdgeThreshold, 140000);
#endif // TIERED
define_pd_global(intx, Tier2CompileThreshold, 10000); // unused level
define_pd_global(intx, Tier3CompileThreshold, 10000);
define_pd_global(intx, Tier4CompileThreshold, 40000);
define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
define_pd_global(intx, OnStackReplacePercentage, 140);
define_pd_global(intx, ConditionalMoveLimit, 4);
......
/*
* Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -30,5 +30,5 @@ public:
// Heuristic for pre-packing the pt/pn bit of a predicted branch.
bool is_backward_branch(Label& L) {
return L.is_bound() && code_end() <= locator_address(L.loc());
return L.is_bound() && insts_end() <= locator_address(L.loc());
}
......@@ -253,11 +253,12 @@ bool frame::safe_for_sender(JavaThread *thread) {
}
// Could just be some random pointer within the codeBlob
if (!sender.cb()->instructions_contains(sender_pc)) return false;
if (!sender.cb()->code_contains(sender_pc)) {
return false;
}
// We should never be able to see an adapter if the current frame is something from code cache
if ( sender_blob->is_adapter_blob()) {
if (sender_blob->is_adapter_blob()) {
return false;
}
......
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -263,8 +263,7 @@
};
private:
constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const;
constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const;
#ifndef CC_INTERP
......
......@@ -2431,3 +2431,20 @@ void InterpreterMacroAssembler::restore_return_value( TosState state, bool is_na
}
#endif // CC_INTERP
}
// Jump if ((*counter_addr += increment) & mask) satisfies the condition.
void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
int increment, int mask,
Register scratch1, Register scratch2,
Condition cond, Label *where) {
ld(counter_addr, scratch1);
add(scratch1, increment, scratch1);
if (is_simm13(mask)) {
andcc(scratch1, mask, G0);
} else {
set(mask, scratch2);
andcc(scratch1, scratch2, G0);
}
br(cond, false, Assembler::pn, *where);
delayed()->st(scratch1, counter_addr);
}
......@@ -278,6 +278,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
void increment_mdp_data_at(Register reg, int constant,
Register bumped_count, Register scratch2,
bool decrement = false);
void increment_mask_and_jump(Address counter_addr,
int increment, int mask,
Register scratch1, Register scratch2,
Condition cond, Label *where);
void set_mdp_flag_at(int flag_constant, Register scratch);
void test_mdp_data_at(int offset, Register value, Label& not_equal_continue,
Register scratch);
......@@ -321,4 +325,5 @@ class InterpreterMacroAssembler: public MacroAssembler {
void save_return_value(TosState state, bool is_native_call);
void restore_return_value(TosState state, bool is_native_call);
};
/*
* Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -50,10 +50,10 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
default: ShouldNotReachHere();
}
ResourceMark rm;
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
address fast_entry = b->instructions_begin();
CodeBuffer cbuf(fast_entry, b->instructions_size());
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
CodeBuffer cbuf(blob);
MacroAssembler* masm = new MacroAssembler(&cbuf);
address fast_entry = __ pc();
Label label1, label2;
......@@ -129,10 +129,10 @@ address JNI_FastGetField::generate_fast_get_int_field() {
address JNI_FastGetField::generate_fast_get_long_field() {
const char *name = "jni_fast_GetLongField";
ResourceMark rm;
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
address fast_entry = b->instructions_begin();
CodeBuffer cbuf(fast_entry, b->instructions_size());
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
CodeBuffer cbuf(blob);
MacroAssembler* masm = new MacroAssembler(&cbuf);
address fast_entry = __ pc();
Label label1, label2;
......@@ -201,10 +201,10 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
default: ShouldNotReachHere();
}
ResourceMark rm;
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
address fast_entry = b->instructions_begin();
CodeBuffer cbuf(fast_entry, b->instructions_size());
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
CodeBuffer cbuf(blob);
MacroAssembler* masm = new MacroAssembler(&cbuf);
address fast_entry = __ pc();
Label label1, label2;
......
......@@ -193,17 +193,17 @@ void NativeCall::test() {
a->call( a->pc(), relocInfo::none );
a->delayed()->nop();
nc = nativeCall_at( cb.code_begin() );
nc = nativeCall_at( cb.insts_begin() );
nc->print();
nc = nativeCall_overwriting_at( nc->next_instruction_address() );
for (idx = 0; idx < ARRAY_SIZE(offsets); idx++) {
nc->set_destination( cb.code_begin() + offsets[idx] );
assert(nc->destination() == (cb.code_begin() + offsets[idx]), "check unit test");
nc->set_destination( cb.insts_begin() + offsets[idx] );
assert(nc->destination() == (cb.insts_begin() + offsets[idx]), "check unit test");
nc->print();
}
nc = nativeCall_before( cb.code_begin() + 8 );
nc = nativeCall_before( cb.insts_begin() + 8 );
nc->print();
VM_Version::revert();
......@@ -368,7 +368,7 @@ void NativeMovConstReg::test() {
a->sethi(al2, O2);
a->add(O2, al2.low10(), O2);
nm = nativeMovConstReg_at( cb.code_begin() );
nm = nativeMovConstReg_at( cb.insts_begin() );
nm->print();
nm = nativeMovConstReg_at( nm->next_instruction_address() );
......@@ -480,7 +480,7 @@ void NativeMovConstRegPatching::test() {
a->nop();
a->add(O2, al2.low10(), O2);
nm = nativeMovConstRegPatching_at( cb.code_begin() );
nm = nativeMovConstRegPatching_at( cb.insts_begin() );
nm->print();
nm = nativeMovConstRegPatching_at( nm->next_instruction_address() );
......@@ -616,7 +616,7 @@ void NativeMovRegMem::test() {
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
a->stf( FloatRegisterImpl::S, F15, O0, I3 ); idx++;
nm = nativeMovRegMem_at( cb.code_begin() );
nm = nativeMovRegMem_at( cb.insts_begin() );
nm->print();
nm->set_offset( low10(0) );
nm->print();
......@@ -760,7 +760,7 @@ void NativeMovRegMemPatching::test() {
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
a->stf( FloatRegisterImpl::S, F15, O0, I3 ); idx++;
nm = nativeMovRegMemPatching_at( cb.code_begin() );
nm = nativeMovRegMemPatching_at( cb.insts_begin() );
nm->print();
nm->set_offset( low10(0) );
nm->print();
......@@ -849,7 +849,7 @@ void NativeJump::test() {
a->jmpl(I3, al.low10(), L3, RelocationHolder::none);
a->delayed()->nop();
nj = nativeJump_at( cb.code_begin() );
nj = nativeJump_at( cb.insts_begin() );
nj->print();
nj = nativeJump_at( nj->next_instruction_address() );
......
......@@ -3331,10 +3331,8 @@ void SharedRuntime::generate_deopt_blob() {
__ stf(FloatRegisterImpl::D, Freturn0, saved_Freturn0_addr);
#if !defined(_LP64)
#if defined(COMPILER2)
if (!TieredCompilation) {
// 32-bit 1-register longs return longs in G1
__ stx(Greturn1, saved_Greturn1_addr);
}
// 32-bit 1-register longs return longs in G1
__ stx(Greturn1, saved_Greturn1_addr);
#endif
__ set_last_Java_frame(SP, noreg);
__ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, Deoptimization::unpack_frames), G2_thread, G4deopt_mode);
......@@ -3347,24 +3345,15 @@ void SharedRuntime::generate_deopt_blob() {
__ reset_last_Java_frame();
__ ldf(FloatRegisterImpl::D, saved_Freturn0_addr, Freturn0);
// In tiered we never use C2 to compile methods returning longs so
// the result is where we expect it already.
#if !defined(_LP64) && defined(COMPILER2)
// In 32 bit, C2 returns longs in G1 so restore the saved G1 into
// I0/I1 if the return value is long. In the tiered world there is
// a mismatch between how C1 and C2 return longs compiles and so
// currently compilation of methods which return longs is disabled
// for C2 and so is this code. Eventually C1 and C2 will do the
// same thing for longs in the tiered world.
if (!TieredCompilation) {
Label not_long;
__ cmp(O0,T_LONG);
__ br(Assembler::notEqual, false, Assembler::pt, not_long);
__ delayed()->nop();
__ ldd(saved_Greturn1_addr,I0);
__ bind(not_long);
}
// I0/I1 if the return value is long.
Label not_long;
__ cmp(O0,T_LONG);
__ br(Assembler::notEqual, false, Assembler::pt, not_long);
__ delayed()->nop();
__ ldd(saved_Greturn1_addr,I0);
__ bind(not_long);
#endif
__ ret();
__ delayed()->restore();
......
......@@ -677,8 +677,7 @@ static inline void emit2_19(CodeBuffer &cbuf, int f30, int f29, int f25, int f22
(f20 << 20) |
(f19 << 19) |
(f0 << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
}
// Standard Sparc opcode form2 field breakdown
......@@ -689,8 +688,7 @@ static inline void emit2_22(CodeBuffer &cbuf, int f30, int f25, int f22, int f0
(f25 << 25) |
(f22 << 22) |
(f0 << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
}
// Standard Sparc opcode form3 field breakdown
......@@ -701,8 +699,7 @@ static inline void emit3(CodeBuffer &cbuf, int f30, int f25, int f19, int f14, i
(f14 << 14) |
(f5 << 5) |
(f0 << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
}
// Standard Sparc opcode form3 field breakdown
......@@ -714,8 +711,7 @@ static inline void emit3_simm13(CodeBuffer &cbuf, int f30, int f25, int f19, int
(f14 << 14) |
(1 << 13) | // bit to indicate immediate-mode
(simm13<<0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
}
static inline void emit3_simm10(CodeBuffer &cbuf, int f30, int f25, int f19, int f14, int simm10 ) {
......@@ -910,9 +906,7 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te
instr |= disp & 0x1FFF;
}
uint *code = (uint*)cbuf.code_end();
*code = instr;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(instr);
#ifdef ASSERT
{
......@@ -1532,7 +1526,7 @@ void emit_java_to_interp(CodeBuffer &cbuf ) {
// set (empty), G5
// jmp -1
address mark = cbuf.inst_mark(); // get mark within main instrs section
address mark = cbuf.insts_mark(); // get mark within main instrs section
MacroAssembler _masm(&cbuf);
......@@ -1632,7 +1626,7 @@ uint size_deopt_handler() {
// Emit exception handler code.
int emit_exception_handler(CodeBuffer& cbuf) {
Register temp_reg = G3;
AddressLiteral exception_blob(OptoRuntime::exception_blob()->instructions_begin());
AddressLiteral exception_blob(OptoRuntime::exception_blob()->entry_point());
MacroAssembler _masm(&cbuf);
address base =
......@@ -2292,8 +2286,7 @@ encode %{
(0 << 13) | // select register move
($pcc$$constant << 11) | // cc1, cc0 bits for 'icc' or 'xcc'
($src$$reg << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
enc_class enc_cmov_imm( cmpOp cmp, iRegI dst, immI11 src, immI pcc ) %{
......@@ -2306,8 +2299,7 @@ encode %{
(1 << 13) | // select immediate move
($pcc$$constant << 11) | // cc1, cc0 bits for 'icc'
(simm11 << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
enc_class enc_cmov_reg_f( cmpOpF cmp, iRegI dst, iRegI src, flagsRegF fcc ) %{
......@@ -2319,8 +2311,7 @@ encode %{
(0 << 13) | // select register move
($fcc$$reg << 11) | // cc1, cc0 bits for fcc0-fcc3
($src$$reg << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
enc_class enc_cmov_imm_f( cmpOp cmp, iRegI dst, immI11 src, flagsRegF fcc ) %{
......@@ -2333,8 +2324,7 @@ encode %{
(1 << 13) | // select immediate move
($fcc$$reg << 11) | // cc1, cc0 bits for fcc0-fcc3
(simm11 << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
enc_class enc_cmovf_reg( cmpOp cmp, regD dst, regD src, immI pcc ) %{
......@@ -2347,8 +2337,7 @@ encode %{
($pcc$$constant << 11) | // cc1-cc0 bits for 'icc' or 'xcc'
($primary << 5) | // select single, double or quad
($src$$reg << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
enc_class enc_cmovff_reg( cmpOpF cmp, flagsRegF fcc, regD dst, regD src ) %{
......@@ -2360,8 +2349,7 @@ encode %{
($fcc$$reg << 11) | // cc2-cc0 bits for 'fccX'
($primary << 5) | // select single, double or quad
($src$$reg << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
// Used by the MIN/MAX encodings. Same as a CMOV, but
......@@ -2375,8 +2363,7 @@ encode %{
(0 << 13) | // select register move
(0 << 11) | // cc1, cc0 bits for 'icc'
($src$$reg << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
enc_class enc_cmov_reg_minmax_long( iRegL dst, iRegL src ) %{
......@@ -2388,8 +2375,7 @@ encode %{
(0 << 13) | // select register move
(0 << 11) | // cc1, cc0 bits for 'icc'
($src$$reg << 0);
*((int*)(cbuf.code_end())) = op;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32(op);
%}
// Utility encoding for loading a 64 bit Pointer into a register
......@@ -3055,7 +3041,7 @@ enc_class enc_Array_Equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, notemp_iRegI r
%}
enc_class enc_rethrow() %{
cbuf.set_inst_mark();
cbuf.set_insts_mark();
Register temp_reg = G3;
AddressLiteral rethrow_stub(OptoRuntime::rethrow_stub());
assert(temp_reg != reg_to_register_object(R_I0_num), "temp must not break oop_reg");
......@@ -3076,23 +3062,17 @@ enc_class enc_Array_Equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, notemp_iRegI r
enc_class emit_mem_nop() %{
// Generates the instruction LDUXA [o6,g0],#0x82,g0
unsigned int *code = (unsigned int*)cbuf.code_end();
*code = (unsigned int)0xc0839040;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32((unsigned int) 0xc0839040);
%}
enc_class emit_fadd_nop() %{
// Generates the instruction FMOVS f31,f31
unsigned int *code = (unsigned int*)cbuf.code_end();
*code = (unsigned int)0xbfa0003f;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32((unsigned int) 0xbfa0003f);
%}
enc_class emit_br_nop() %{
// Generates the instruction BPN,PN .
unsigned int *code = (unsigned int*)cbuf.code_end();
*code = (unsigned int)0x00400000;
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
cbuf.insts()->emit_int32((unsigned int) 0x00400000);
%}
enc_class enc_membar_acquire %{
......
......@@ -43,7 +43,7 @@ enum /* platform_dependent_constants */ {
// MethodHandles adapters
enum method_handles_platform_dependent_constants {
method_handles_adapters_code_size = 6000
method_handles_adapters_code_size = 12000
};
class Sparc {
......
......@@ -294,35 +294,65 @@ address TemplateInterpreterGenerator::generate_continuation_for(TosState state)
// ??: invocation counter
//
void InterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue) {
// Update standard invocation counters
__ increment_invocation_counter(O0, G3_scratch);
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
Address interpreter_invocation_counter(Lmethod, methodOopDesc::interpreter_invocation_counter_offset());
__ ld(interpreter_invocation_counter, G3_scratch);
__ inc(G3_scratch);
__ st(G3_scratch, interpreter_invocation_counter);
}
// Note: In tiered we increment either counters in methodOop or in MDO depending if we're profiling or not.
if (TieredCompilation) {
const int increment = InvocationCounter::count_increment;
const int mask = ((1 << Tier0InvokeNotifyFreqLog) - 1) << InvocationCounter::count_shift;
Label no_mdo, done;
if (ProfileInterpreter) {
// If no method data exists, go to profile_continue.
__ ld_ptr(Lmethod, methodOopDesc::method_data_offset(), G4_scratch);
__ br_null(G4_scratch, false, Assembler::pn, no_mdo);
__ delayed()->nop();
// Increment counter
Address mdo_invocation_counter(G4_scratch,
in_bytes(methodDataOopDesc::invocation_counter_offset()) +
in_bytes(InvocationCounter::counter_offset()));
__ increment_mask_and_jump(mdo_invocation_counter, increment, mask,
G3_scratch, Lscratch,
Assembler::zero, overflow);
__ ba(false, done);
__ delayed()->nop();
}
// Increment counter in methodOop
__ bind(no_mdo);
Address invocation_counter(Lmethod,
in_bytes(methodOopDesc::invocation_counter_offset()) +
in_bytes(InvocationCounter::counter_offset()));
__ increment_mask_and_jump(invocation_counter, increment, mask,
G3_scratch, Lscratch,
Assembler::zero, overflow);
__ bind(done);
} else {
// Update standard invocation counters
__ increment_invocation_counter(O0, G3_scratch);
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
Address interpreter_invocation_counter(Lmethod,in_bytes(methodOopDesc::interpreter_invocation_counter_offset()));
__ ld(interpreter_invocation_counter, G3_scratch);
__ inc(G3_scratch);
__ st(G3_scratch, interpreter_invocation_counter);
}
if (ProfileInterpreter && profile_method != NULL) {
// Test to see if we should create a method data oop
AddressLiteral profile_limit((address)&InvocationCounter::InterpreterProfileLimit);
__ load_contents(profile_limit, G3_scratch);
__ cmp(O0, G3_scratch);
__ br(Assembler::lessUnsigned, false, Assembler::pn, *profile_method_continue);
__ delayed()->nop();
// if no method data exists, go to profile_method
__ test_method_data_pointer(*profile_method);
}
if (ProfileInterpreter && profile_method != NULL) {
// Test to see if we should create a method data oop
AddressLiteral profile_limit(&InvocationCounter::InterpreterProfileLimit);
__ sethi(profile_limit, G3_scratch);
__ ld(G3_scratch, profile_limit.low10(), G3_scratch);
AddressLiteral invocation_limit((address)&InvocationCounter::InterpreterInvocationLimit);
__ load_contents(invocation_limit, G3_scratch);
__ cmp(O0, G3_scratch);
__ br(Assembler::lessUnsigned, false, Assembler::pn, *profile_method_continue);
__ br(Assembler::greaterEqualUnsigned, false, Assembler::pn, *overflow);
__ delayed()->nop();
// if no method data exists, go to profile_method
__ test_method_data_pointer(*profile_method);
}
AddressLiteral invocation_limit(&InvocationCounter::InterpreterInvocationLimit);
__ sethi(invocation_limit, G3_scratch);
__ ld(G3_scratch, invocation_limit.low10(), G3_scratch);
__ cmp(O0, G3_scratch);
__ br(Assembler::greaterEqualUnsigned, false, Assembler::pn, *overflow);
__ delayed()->nop();
}
// Allocate monitor and lock method (asm interpreter)
......
......@@ -2242,6 +2242,11 @@ public:
Register limit, Register result, Register chr,
XMMRegister vec1, XMMRegister vec2);
// Fill primitive arrays
void generate_fill(BasicType t, bool aligned,
Register to, Register value, Register count,
Register rtmp, XMMRegister xtmp);
#undef VIRTUAL
};
......
......@@ -68,19 +68,15 @@ void ConversionStub::emit_code(LIR_Assembler* ce) {
__ jmp(_continuation);
}
#ifdef TIERED
void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
__ bind(_entry);
ce->store_parameter(_method->as_register(), 1);
ce->store_parameter(_bci, 0);
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id)));
ce->add_call_info_here(_info);
ce->verify_oop_map(_info);
__ jmp(_continuation);
}
#endif // TIERED
RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index,
bool throw_index_out_of_bounds_exception)
......
......@@ -42,7 +42,10 @@
// method.
Address as_Address(LIR_Address* addr, Register tmp);
// Record the type of the receiver in ReceiverTypeData
void type_profile_helper(Register mdo,
ciMethodData *md, ciProfileData *data,
Register recv, Label* update_done);
public:
void store_parameter(Register r, int offset_from_esp_in_words);
......
......@@ -63,7 +63,7 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
address original_pc = nmethod::get_deopt_original_pc(this);
if (original_pc != NULL) {
_pc = original_pc;
assert(((nmethod*)_cb)->code_contains(_pc), "original PC must be in nmethod");
assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod");
_deopt_state = is_deoptimized;
} else {
_deopt_state = not_deoptimized;
......
......@@ -185,6 +185,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
bool decrement = false);
void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
bool decrement = false);
void increment_mask_and_jump(Address counter_addr,
int increment, int mask,
Register scratch, bool preloaded,
Condition cond, Label* where);
void set_mdp_flag_at(Register mdp_in, int flag_constant);
void test_mdp_data_at(Register mdp_in, int offset, Register value,
Register test_value_out,
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册