Merge
This commit is contained in:
commit
f5db22169b
@ -73,7 +73,7 @@ else
|
|||||||
include defs.make
|
include defs.make
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(GAMMADIR)/make/closed.make
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
ifneq ($(ALT_OUTPUTDIR),)
|
ifneq ($(ALT_OUTPUTDIR),)
|
||||||
ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR)
|
ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR)
|
||||||
@ -362,6 +362,7 @@ $(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/code/%
|
|||||||
$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
|
$(EXPORT_INCLUDE_DIR)/%: $(HS_SRC_DIR)/share/vm/prims/%
|
||||||
$(install-file)
|
$(install-file)
|
||||||
|
|
||||||
|
HS_JNI_ARCH_SRC=$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h)
|
||||||
$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC)
|
$(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h: $(HS_JNI_ARCH_SRC)
|
||||||
$(install-file)
|
$(install-file)
|
||||||
|
|
||||||
|
92
hotspot/make/altsrc.make
Normal file
92
hotspot/make/altsrc.make
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2011, 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.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
# This file defines variables and macros which are used in the makefiles to
|
||||||
|
# allow distributions to augment or replace common hotspot code with
|
||||||
|
# distribution-specific source files.
|
||||||
|
|
||||||
|
# Requires: GAMMADIR
|
||||||
|
# Provides:
|
||||||
|
# variables: HS_COMMON_SRC, HS_ALT_SRC, HS_COMMON_SRC_REL, and HS_ALT_SRC_REL
|
||||||
|
# functions: altsrc-equiv, if-has-altsrc, altsrc, altsrc-replace
|
||||||
|
|
||||||
|
HS_COMMON_SRC_REL=src
|
||||||
|
|
||||||
|
# This needs to be changed to a more generic location, but we keep it as this
|
||||||
|
# for now for compatibility
|
||||||
|
HS_ALT_SRC_REL=src/closed
|
||||||
|
|
||||||
|
HS_COMMON_SRC=$(GAMMADIR)/$(HS_COMMON_SRC_REL)
|
||||||
|
HS_ALT_SRC=$(GAMMADIR)/$(HS_ALT_SRC_REL)
|
||||||
|
|
||||||
|
|
||||||
|
## altsrc-equiv
|
||||||
|
#
|
||||||
|
# Convert a common source path to an alternative source path
|
||||||
|
#
|
||||||
|
# Parameter: An absolute path into the common sources
|
||||||
|
# Result: The matching path to the alternate-source location
|
||||||
|
#
|
||||||
|
altsrc-equiv=$(subst $(HS_COMMON_SRC)/,$(HS_ALT_SRC)/,$(1))
|
||||||
|
|
||||||
|
|
||||||
|
## if-has-altsrc
|
||||||
|
#
|
||||||
|
# Conditional macro to test for the existence of an alternate source path
|
||||||
|
#
|
||||||
|
# Parameter: An absolute path into the common sources
|
||||||
|
# Parameter: Result if the alternative-source location exists
|
||||||
|
# Parameter: Result if the alternative-source location does not exist
|
||||||
|
# Result: expands to parameter 2 or 3 depending on existence of alternate source
|
||||||
|
#
|
||||||
|
if-has-altsrc=$(if $(wildcard $(call altsrc-equiv,$(1))),$(2),$(3))
|
||||||
|
|
||||||
|
|
||||||
|
## altsrc
|
||||||
|
#
|
||||||
|
# Converts common source path to alternate source path if the alternate
|
||||||
|
# path exists, otherwise evaluates to nul (empty string)
|
||||||
|
#
|
||||||
|
# Parameter: An absolute path into the common sources
|
||||||
|
# Result: The equivalent path to the alternate-source location, if such a
|
||||||
|
# location exists on the filesystem. Otherwise it expands to empty.
|
||||||
|
#
|
||||||
|
altsrc=$(call if-has-altsrc,$(1),$(call altsrc-equiv,$(1)))
|
||||||
|
|
||||||
|
## commonsrc
|
||||||
|
#
|
||||||
|
# Returns parameter.
|
||||||
|
#
|
||||||
|
commonsrc=$(1)
|
||||||
|
|
||||||
|
|
||||||
|
## altsrc-replace
|
||||||
|
#
|
||||||
|
# Converts a common source path to an alternate source path if the alternate
|
||||||
|
# source path exists. Otherwise it evaluates to the input common source path.
|
||||||
|
#
|
||||||
|
# Parameter: An absolute path into the common sources
|
||||||
|
# Result: A path to either the common or alternate sources
|
||||||
|
#
|
||||||
|
altsrc-replace=$(call if-has-altsrc,$(1),$(call altsrc-equiv,$(1)),$(1))
|
@ -1,59 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011, 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.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
# Support for setting HS_CLOSED_PATH, required GAMMADIR and SRCARCH
|
|
||||||
|
|
||||||
CLOSED_DIR_EXISTS := $(shell \
|
|
||||||
if [ -d $(GAMMADIR)/src/closed ] ; then \
|
|
||||||
echo true; \
|
|
||||||
else \
|
|
||||||
echo false; \
|
|
||||||
fi)
|
|
||||||
|
|
||||||
CLOSED_SRCARCH_DIR_EXISTS := $(shell \
|
|
||||||
if [ -d $(GAMMADIR)/src/closed/cpu/$(SRCARCH)/vm ] ; then \
|
|
||||||
echo true; \
|
|
||||||
else \
|
|
||||||
echo false; \
|
|
||||||
fi)
|
|
||||||
|
|
||||||
ifeq ($(CLOSED_SRCARCH_DIR_EXISTS), true)
|
|
||||||
HS_CLOSED_PATH=closed/
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Support for setting HS_JNI_ARCH_SRC, requires HS_SRC_DIR and HS_ARCH
|
|
||||||
|
|
||||||
CLOSED_HS_ARCH_DIR_EXISTS := $(shell \
|
|
||||||
if [ -d $(HS_SRC_DIR)/closed/cpu/$(HS_ARCH)/vm ] ; then \
|
|
||||||
echo true; \
|
|
||||||
else \
|
|
||||||
echo false; \
|
|
||||||
fi)
|
|
||||||
|
|
||||||
ifeq ($(CLOSED_HS_ARCH_DIR_EXISTS), true)
|
|
||||||
HS_JNI_ARCH_SRC=$(HS_SRC_DIR)/closed/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h
|
|
||||||
else
|
|
||||||
HS_JNI_ARCH_SRC=$(HS_SRC_DIR)/cpu/$(HS_ARCH)/vm/jni_$(HS_ARCH).h
|
|
||||||
endif
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,8 +39,9 @@ OS = $(Platform_os_family)
|
|||||||
|
|
||||||
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
|
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
|
||||||
|
|
||||||
SOURCES.AD = $(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
|
SOURCES.AD = \
|
||||||
$(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad
|
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
|
||||||
|
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
|
||||||
|
|
||||||
EXEC = $(OUTDIR)/adlc
|
EXEC = $(OUTDIR)/adlc
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -56,7 +56,7 @@
|
|||||||
# having to read the dependency files for the vm.
|
# having to read the dependency files for the vm.
|
||||||
|
|
||||||
include $(GAMMADIR)/make/scm.make
|
include $(GAMMADIR)/make/scm.make
|
||||||
include $(GAMMADIR)/make/closed.make
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
|
|
||||||
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
|
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
|
||||||
@ -148,7 +148,7 @@ endif
|
|||||||
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
||||||
# or make/hotspot_distro.
|
# or make/hotspot_distro.
|
||||||
ifndef HOTSPOT_VM_DISTRO
|
ifndef HOTSPOT_VM_DISTRO
|
||||||
ifeq ($(CLOSED_DIR_EXISTS), true)
|
ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
|
||||||
include $(GAMMADIR)/make/hotspot_distro
|
include $(GAMMADIR)/make/hotspot_distro
|
||||||
else
|
else
|
||||||
include $(GAMMADIR)/make/openjdk_distro
|
include $(GAMMADIR)/make/openjdk_distro
|
||||||
@ -173,6 +173,11 @@ $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
|
|||||||
$(SIMPLE_DIRS):
|
$(SIMPLE_DIRS):
|
||||||
$(QUIETLY) mkdir -p $@
|
$(QUIETLY) mkdir -p $@
|
||||||
|
|
||||||
|
# Convenience macro which takes a source relative path, applies $(1) to the
|
||||||
|
# absolute path, and then replaces $(GAMMADIR) in the result with a
|
||||||
|
# literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.
|
||||||
|
gamma-path=$(subst $(GAMMADIR),\$$(GAMMADIR),$(call $(1),$(HS_COMMON_SRC)/$(2)))
|
||||||
|
|
||||||
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||||
@echo Creating $@ ...
|
@echo Creating $@ ...
|
||||||
$(QUIETLY) ( \
|
$(QUIETLY) ( \
|
||||||
@ -204,16 +209,28 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
|||||||
echo; \
|
echo; \
|
||||||
echo "Src_Dirs_V = \\"; \
|
echo "Src_Dirs_V = \\"; \
|
||||||
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
|
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
|
||||||
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(SRCARCH)/vm \\"; \
|
echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm"; \
|
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||||
echo; \
|
echo; \
|
||||||
echo "Src_Dirs_I = \\"; \
|
echo "Src_Dirs_I = \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/share/vm \\"; \
|
echo "$(call gamma-path,altsrc,share/vm/prims) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \
|
echo "$(call gamma-path,commonsrc,share/vm/prims) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(SRCARCH)/vm \\"; \
|
echo "$(call gamma-path,altsrc,share/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
echo "$(call gamma-path,commonsrc,share/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm"; \
|
echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||||
[ -n "$(CFLAGS_BROWSE)" ] && \
|
[ -n "$(CFLAGS_BROWSE)" ] && \
|
||||||
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
|
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
|
||||||
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
|
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
|
||||||
@ -237,9 +254,14 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
|||||||
|
|
||||||
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
||||||
@echo Creating directory list $@
|
@echo Creating directory list $@
|
||||||
$(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \
|
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
|
||||||
|
find $(HS_ALT_SRC)/share/vm/* -prune \
|
||||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@
|
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@; \
|
||||||
|
fi;
|
||||||
|
$(QUIETLY) find $(HS_COMMON_SRC)/share/vm/* -prune \
|
||||||
|
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||||
|
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
|
||||||
|
|
||||||
Makefile: $(BUILDTREE_MAKE)
|
Makefile: $(BUILDTREE_MAKE)
|
||||||
@echo Creating $@ ...
|
@echo Creating $@ ...
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -146,7 +146,7 @@ ifndef LP64
|
|||||||
include $(GAMMADIR)/make/pic.make
|
include $(GAMMADIR)/make/pic.make
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(GAMMADIR)/make/closed.make
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
# The non-PIC object files are only generated for 32 bit platforms.
|
# The non-PIC object files are only generated for 32 bit platforms.
|
||||||
ifdef LP64
|
ifdef LP64
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
||||||
#MAKE = gmake
|
#MAKE = gmake
|
||||||
|
|
||||||
include $(GAMMADIR)/make/closed.make
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
TOPDIR = $(shell echo `pwd`)
|
TOPDIR = $(shell echo `pwd`)
|
||||||
GENERATED = $(TOPDIR)/../generated
|
GENERATED = $(TOPDIR)/../generated
|
||||||
@ -59,8 +59,8 @@ Cached_plat = $(GENERATED)/platform.current
|
|||||||
|
|
||||||
AD_Dir = $(GENERATED)/adfiles
|
AD_Dir = $(GENERATED)/adfiles
|
||||||
ADLC = $(AD_Dir)/adlc
|
ADLC = $(AD_Dir)/adlc
|
||||||
AD_Spec = $(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
|
AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
|
||||||
AD_Src = $(GAMMADIR)/src/share/vm/adlc
|
AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
|
||||||
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
||||||
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
# Common build rules.
|
# Common build rules.
|
||||||
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
|
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
|
||||||
include $(MAKEFILES_DIR)/rules.make
|
include $(MAKEFILES_DIR)/rules.make
|
||||||
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
@ -119,16 +120,26 @@ JVM = jvm
|
|||||||
LIBJVM = lib$(JVM).so
|
LIBJVM = lib$(JVM).so
|
||||||
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
|
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
|
||||||
|
|
||||||
CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
|
SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
|
||||||
CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
|
|
||||||
CORE_PATHS += $(GAMMADIR)/src/$(HS_CLOSED_PATH)cpu/$(Platform_arch)/vm
|
SOURCE_PATHS=\
|
||||||
CORE_PATHS += $(GAMMADIR)/src/$(HS_CLOSED_PATH)os_cpu/$(Platform_os_arch)/vm
|
$(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
|
||||||
|
\( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
|
||||||
|
|
||||||
|
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
|
||||||
CORE_PATHS+=$(GENERATED)/jvmtifiles
|
CORE_PATHS+=$(GENERATED)/jvmtifiles
|
||||||
|
|
||||||
COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1
|
COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
|
||||||
|
COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
|
||||||
|
|
||||||
COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto
|
COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
|
||||||
COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt
|
COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt)
|
||||||
|
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/opto
|
||||||
|
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt
|
||||||
COMPILER2_PATHS += $(GENERATED)/adfiles
|
COMPILER2_PATHS += $(GENERATED)/adfiles
|
||||||
|
|
||||||
# Include dirs per type.
|
# Include dirs per type.
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
# It knows how to compile, link, and run the adlc.
|
# It knows how to compile, link, and run the adlc.
|
||||||
|
|
||||||
include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/rules.make
|
include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/rules.make
|
||||||
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
# #########################################################################
|
# #########################################################################
|
||||||
|
|
||||||
@ -39,8 +40,9 @@ OS = $(Platform_os_family)
|
|||||||
|
|
||||||
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
|
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
|
||||||
|
|
||||||
SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(Platform_arch_model).ad \
|
SOURCES.AD = \
|
||||||
$(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad
|
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
|
||||||
|
$(call altsrc-replace,$(HS_COMMON_SRC)/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(Platform_arch_model).ad)
|
||||||
|
|
||||||
EXEC = $(OUTDIR)/adlc
|
EXEC = $(OUTDIR)/adlc
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
# having to read the dependency files for the vm.
|
# having to read the dependency files for the vm.
|
||||||
|
|
||||||
include $(GAMMADIR)/make/scm.make
|
include $(GAMMADIR)/make/scm.make
|
||||||
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
|
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
|
||||||
QUIETLY$(MAKE_VERBOSE) = @
|
QUIETLY$(MAKE_VERBOSE) = @
|
||||||
@ -139,13 +140,7 @@ endif
|
|||||||
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
||||||
# or make/hotspot_distro.
|
# or make/hotspot_distro.
|
||||||
ifndef HOTSPOT_VM_DISTRO
|
ifndef HOTSPOT_VM_DISTRO
|
||||||
CLOSED_DIR_EXISTS := $(shell \
|
ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
|
||||||
if [ -d $(GAMMADIR)/src/closed ] ; then \
|
|
||||||
echo true; \
|
|
||||||
else \
|
|
||||||
echo false; \
|
|
||||||
fi)
|
|
||||||
ifeq ($(CLOSED_DIR_EXISTS), true)
|
|
||||||
include $(GAMMADIR)/make/hotspot_distro
|
include $(GAMMADIR)/make/hotspot_distro
|
||||||
else
|
else
|
||||||
include $(GAMMADIR)/make/openjdk_distro
|
include $(GAMMADIR)/make/openjdk_distro
|
||||||
@ -170,6 +165,11 @@ $(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
|
|||||||
$(SIMPLE_DIRS):
|
$(SIMPLE_DIRS):
|
||||||
$(QUIETLY) mkdir -p $@
|
$(QUIETLY) mkdir -p $@
|
||||||
|
|
||||||
|
# Convenience macro which takes a source relative path, applies $(1) to the
|
||||||
|
# absolute path, and then replaces $(GAMMADIR) in the result with a
|
||||||
|
# literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.
|
||||||
|
gamma-path=$(subst $(GAMMADIR),\$$(GAMMADIR),$(call $(1),$(HS_COMMON_SRC)/$(2)))
|
||||||
|
|
||||||
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||||
@echo Creating $@ ...
|
@echo Creating $@ ...
|
||||||
$(QUIETLY) ( \
|
$(QUIETLY) ( \
|
||||||
@ -202,16 +202,28 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
|||||||
echo; \
|
echo; \
|
||||||
echo "Src_Dirs_V = \\"; \
|
echo "Src_Dirs_V = \\"; \
|
||||||
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
|
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
|
||||||
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
|
echo "$(call gamma-path,altsrc,cpu/$(ARCH)/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
echo "$(call gamma-path,commonsrc,cpu/$(ARCH)/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
|
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||||
echo; \
|
echo; \
|
||||||
echo "Src_Dirs_I = \\"; \
|
echo "Src_Dirs_I = \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/share/vm \\"; \
|
echo "$(call gamma-path,altsrc,share/vm/prims) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/share/vm/prims \\"; \
|
echo "$(call gamma-path,commonsrc,share/vm/prims) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/cpu/$(ARCH)/vm \\"; \
|
echo "$(call gamma-path,altsrc,share/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/os/$(OS_FAMILY)/vm \\"; \
|
echo "$(call gamma-path,commonsrc,share/vm) \\"; \
|
||||||
echo "\$$(GAMMADIR)/src/os_cpu/$(OS_FAMILY)_$(ARCH)/vm"; \
|
echo "$(call gamma-path,altsrc,cpu/$(ARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,cpu/$(ARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(ARCH)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||||
|
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||||
[ -n "$(CFLAGS_BROWSE)" ] && \
|
[ -n "$(CFLAGS_BROWSE)" ] && \
|
||||||
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
|
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
|
||||||
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
|
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
|
||||||
@ -235,9 +247,14 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
|||||||
|
|
||||||
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
||||||
@echo Creating directory list $@
|
@echo Creating directory list $@
|
||||||
$(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \
|
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
|
||||||
|
find $(HS_ALT_SRC)/share/vm/* -prune \
|
||||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@
|
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@; \
|
||||||
|
fi;
|
||||||
|
$(QUIETLY) find $(HS_COMMON_SRC)/share/vm/* -prune \
|
||||||
|
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||||
|
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
|
||||||
|
|
||||||
Makefile: $(BUILDTREE_MAKE)
|
Makefile: $(BUILDTREE_MAKE)
|
||||||
@echo Creating $@ ...
|
@echo Creating $@ ...
|
||||||
|
@ -146,6 +146,8 @@ ifndef LP64
|
|||||||
include $(GAMMADIR)/make/pic.make
|
include $(GAMMADIR)/make/pic.make
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
|
# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
|
||||||
ifdef LP64
|
ifdef LP64
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
||||||
#MAKE = gmake
|
#MAKE = gmake
|
||||||
|
|
||||||
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
GENERATED = ../generated
|
GENERATED = ../generated
|
||||||
VM = $(GAMMADIR)/src/share/vm
|
VM = $(GAMMADIR)/src/share/vm
|
||||||
Plat_File = $(Platform_file)
|
Plat_File = $(Platform_file)
|
||||||
@ -48,8 +50,8 @@ Cached_plat = $(GENERATED)/platform.current
|
|||||||
|
|
||||||
AD_Dir = $(GENERATED)/adfiles
|
AD_Dir = $(GENERATED)/adfiles
|
||||||
ADLC = $(AD_Dir)/adlc
|
ADLC = $(AD_Dir)/adlc
|
||||||
AD_Spec = $(GAMMADIR)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
|
AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
|
||||||
AD_Src = $(GAMMADIR)/src/share/vm/adlc
|
AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
|
||||||
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
||||||
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
# Common build rules.
|
# Common build rules.
|
||||||
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
|
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
|
||||||
include $(MAKEFILES_DIR)/rules.make
|
include $(MAKEFILES_DIR)/rules.make
|
||||||
|
include $(GAMMADIR)/make/altsrc.make
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
@ -139,16 +140,26 @@ JVM = jvm
|
|||||||
LIBJVM = lib$(JVM).so
|
LIBJVM = lib$(JVM).so
|
||||||
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
|
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
|
||||||
|
|
||||||
CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \))
|
SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
|
||||||
CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm
|
|
||||||
CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm
|
SOURCE_PATHS=\
|
||||||
CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm
|
$(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
|
||||||
|
\( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
|
||||||
|
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
|
||||||
|
|
||||||
|
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
|
||||||
CORE_PATHS+=$(GENERATED)/jvmtifiles
|
CORE_PATHS+=$(GENERATED)/jvmtifiles
|
||||||
|
|
||||||
COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1
|
COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
|
||||||
|
COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
|
||||||
|
|
||||||
COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto
|
COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
|
||||||
COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt
|
COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt)
|
||||||
|
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/opto
|
||||||
|
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt
|
||||||
COMPILER2_PATHS += $(GENERATED)/adfiles
|
COMPILER2_PATHS += $(GENERATED)/adfiles
|
||||||
|
|
||||||
# Include dirs per type.
|
# Include dirs per type.
|
||||||
|
@ -51,21 +51,48 @@ Platform_os_arch=windows_$Platform_arch
|
|||||||
WorkSpace=$4
|
WorkSpace=$4
|
||||||
GENERATED=$5
|
GENERATED=$5
|
||||||
|
|
||||||
BASE_PATHS="` $FIND ${WorkSpace}/src/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`"
|
COMMONSRC_REL=src
|
||||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/share/vm/gc_implementation/shared"
|
ALTSRC_REL=src/closed # Change this to pick up alt sources from somewhere else
|
||||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os/${Platform_os_family}/vm"
|
|
||||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/cpu/${Platform_arch}/vm"
|
COMMONSRC=${WorkSpace}/${COMMONSRC_REL}
|
||||||
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os_cpu/${Platform_os_arch}/vm"
|
ALTSRC=${WorkSpace}/${ALTSRC_REL}
|
||||||
|
|
||||||
|
BASE_PATHS="`if [ -d ${ALTSRC}/share/vm ]; then $FIND ${ALTSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \); fi`"
|
||||||
|
BASE_PATHS="${BASE_PATHS} ` $FIND ${COMMONSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`"
|
||||||
|
|
||||||
|
for sd in \
|
||||||
|
share/vm/gc_implementation/shared \
|
||||||
|
os/${Platform_os_family}/vm \
|
||||||
|
cpu/${Platform_arch}/vm \
|
||||||
|
os_cpu/${Platform_os_arch}/vm; do
|
||||||
|
if [ -d "${ALTSRC}/${sd}" ]; then
|
||||||
|
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/${sd}"
|
||||||
|
fi
|
||||||
|
BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/${sd}"
|
||||||
|
done
|
||||||
|
|
||||||
BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles"
|
BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles"
|
||||||
|
|
||||||
CORE_PATHS="${BASE_PATHS}"
|
CORE_PATHS="${BASE_PATHS}"
|
||||||
# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS.
|
# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS.
|
||||||
CORE_PATHS="${CORE_PATHS} `$FIND ${WorkSpace}/src/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
|
if [ -d "${ALTSRC}/share/vm/gc_implementation" ]; then
|
||||||
|
CORE_PATHS="${CORE_PATHS} `$FIND ${ALTSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
|
||||||
|
fi
|
||||||
|
CORE_PATHS="${CORE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
|
||||||
|
|
||||||
COMPILER1_PATHS="${WorkSpace}/src/share/vm/c1"
|
if [ -d "${ALTSRC}/share/vm/c1" ]; then
|
||||||
|
COMPILER1_PATHS="${ALTSRC}/share/vm/c1"
|
||||||
|
fi
|
||||||
|
COMPILER1_PATHS="${COMPILER1_PATHS} ${COMMONSRC}/share/vm/c1"
|
||||||
|
|
||||||
COMPILER2_PATHS="${WorkSpace}/src/share/vm/opto"
|
if [ -d "${ALTSRC}/share/vm/opto" ]; then
|
||||||
COMPILER2_PATHS="${COMPILER2_PATHS} ${WorkSpace}/src/share/vm/libadt"
|
COMPILER2_PATHS="${ALTSRC}/share/vm/opto"
|
||||||
|
fi
|
||||||
|
COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/opto"
|
||||||
|
if [ -d "${ALTSRC}/share/vm/libadt" ]; then
|
||||||
|
COMPILER2_PATHS="${COMPILER2_PATHS} ${ALTSRC}/share/vm/libadt"
|
||||||
|
fi
|
||||||
|
COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/libadt"
|
||||||
COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles"
|
COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles"
|
||||||
|
|
||||||
# Include dirs per type.
|
# Include dirs per type.
|
||||||
|
@ -27,6 +27,9 @@ Res_Files=.\version.res
|
|||||||
|
|
||||||
!include ..\generated\objfiles.make
|
!include ..\generated\objfiles.make
|
||||||
|
|
||||||
|
COMMONSRC=$(WorkSpace)\src
|
||||||
|
ALTSRC=$(WorkSpace)\src\closed
|
||||||
|
|
||||||
!ifdef RELEASE
|
!ifdef RELEASE
|
||||||
!ifdef DEVELOP
|
!ifdef DEVELOP
|
||||||
CPP_FLAGS=$(CPP_FLAGS) /D "DEBUG"
|
CPP_FLAGS=$(CPP_FLAGS) /D "DEBUG"
|
||||||
@ -111,13 +114,30 @@ LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
|
|||||||
/export:JVM_GetThreadStateValues \
|
/export:JVM_GetThreadStateValues \
|
||||||
/export:JVM_InitAgentProperties
|
/export:JVM_InitAgentProperties
|
||||||
|
|
||||||
CPP_INCLUDE_DIRS=\
|
CPP_INCLUDE_DIRS=/I "..\generated"
|
||||||
/I "..\generated" \
|
|
||||||
/I "$(WorkSpace)\src\share\vm" \
|
!if exists($(ALTSRC)\share\vm)
|
||||||
/I "$(WorkSpace)\src\share\vm\prims" \
|
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\share\vm"
|
||||||
/I "$(WorkSpace)\src\os\windows\vm" \
|
!endif
|
||||||
/I "$(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm" \
|
|
||||||
/I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
|
!if exists($(ALTSRC)\os\windows\vm)
|
||||||
|
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os\windows\vm"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if exists($(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm)
|
||||||
|
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if exists($(ALTSRC)\cpu\$(Platform_arch)\vm)
|
||||||
|
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) /I "$(ALTSRC)\cpu\$(Platform_arch)\vm"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
CPP_INCLUDE_DIRS=$(CPP_INCLUDE_DIRS) \
|
||||||
|
/I "$(COMMONSRC)\share\vm" \
|
||||||
|
/I "$(COMMONSRC)\share\vm\prims" \
|
||||||
|
/I "$(COMMONSRC)\os\windows\vm" \
|
||||||
|
/I "$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm" \
|
||||||
|
/I "$(COMMONSRC)\cpu\$(Platform_arch)\vm"
|
||||||
|
|
||||||
CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
|
CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
|
||||||
|
|
||||||
@ -127,7 +147,7 @@ CPP_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
|
|||||||
CPP_USE_PCH=$(CPP_DONT_USE_PCH)
|
CPP_USE_PCH=$(CPP_DONT_USE_PCH)
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# Where to find the source code for the virtual machine
|
# Where to find the source code for the virtual machine (is this used?)
|
||||||
VM_PATH=../generated
|
VM_PATH=../generated
|
||||||
VM_PATH=$(VM_PATH);../generated/adfiles
|
VM_PATH=$(VM_PATH);../generated/adfiles
|
||||||
VM_PATH=$(VM_PATH);../generated/jvmtifiles
|
VM_PATH=$(VM_PATH);../generated/jvmtifiles
|
||||||
@ -188,81 +208,157 @@ bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWi
|
|||||||
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
|
$(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
|
||||||
|
|
||||||
# Default rules for the Virtual Machine
|
# Default rules for the Virtual Machine
|
||||||
{$(WorkSpace)\src\share\vm\c1}.cpp.obj::
|
{$(COMMONSRC)\share\vm\c1}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\compiler}.cpp.obj::
|
{$(COMMONSRC)\share\vm\compiler}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\code}.cpp.obj::
|
{$(COMMONSRC)\share\vm\code}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\interpreter}.cpp.obj::
|
{$(COMMONSRC)\share\vm\interpreter}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\ci}.cpp.obj::
|
{$(COMMONSRC)\share\vm\ci}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\classfile}.cpp.obj::
|
{$(COMMONSRC)\share\vm\classfile}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
|
{$(COMMONSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\gc_implementation\shared}.cpp.obj::
|
{$(COMMONSRC)\share\vm\gc_implementation\shared}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\gc_implementation\parNew}.cpp.obj::
|
{$(COMMONSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
|
{$(COMMONSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\gc_implementation\g1}.cpp.obj::
|
{$(COMMONSRC)\share\vm\gc_implementation\g1}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\gc_interface}.cpp.obj::
|
{$(COMMONSRC)\share\vm\gc_interface}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\asm}.cpp.obj::
|
{$(COMMONSRC)\share\vm\asm}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\memory}.cpp.obj::
|
{$(COMMONSRC)\share\vm\memory}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\oops}.cpp.obj::
|
{$(COMMONSRC)\share\vm\oops}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\prims}.cpp.obj::
|
{$(COMMONSRC)\share\vm\prims}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\runtime}.cpp.obj::
|
{$(COMMONSRC)\share\vm\runtime}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\services}.cpp.obj::
|
{$(COMMONSRC)\share\vm\services}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\utilities}.cpp.obj::
|
{$(COMMONSRC)\share\vm\utilities}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\libadt}.cpp.obj::
|
{$(COMMONSRC)\share\vm\libadt}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\share\vm\opto}.cpp.obj::
|
{$(COMMONSRC)\share\vm\opto}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\os\windows\vm}.cpp.obj::
|
{$(COMMONSRC)\os\windows\vm}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
# This guy should remain a single colon rule because
|
# This guy should remain a single colon rule because
|
||||||
# otherwise we can't specify the output filename.
|
# otherwise we can't specify the output filename.
|
||||||
{$(WorkSpace)\src\os\windows\vm}.rc.res:
|
{$(COMMONSRC)\os\windows\vm}.rc.res:
|
||||||
@$(RC) $(RC_FLAGS) /fo"$@" $<
|
@$(RC) $(RC_FLAGS) /fo"$@" $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\cpu\$(Platform_arch)\vm}.cpp.obj::
|
{$(COMMONSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{$(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
|
{$(COMMONSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\c1}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\compiler}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\code}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\interpreter}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\ci}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\classfile}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\gc_implementation\parallelScavenge}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\gc_implementation\shared}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\gc_implementation\parNew}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\gc_implementation\concurrentMarkSweep}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\gc_implementation\g1}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\gc_interface}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\asm}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\memory}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\oops}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\prims}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\runtime}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\services}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\utilities}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\libadt}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\share\vm\opto}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\os\windows\vm}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
# otherwise we can't specify the output filename.
|
||||||
|
{$(ALTSRC)\os\windows\vm}.rc.res:
|
||||||
|
@$(RC) $(RC_FLAGS) /fo"$@" $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
|
||||||
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
|
{$(ALTSRC)\os_cpu\windows_$(Platform_arch)\vm}.cpp.obj::
|
||||||
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
$(CPP) $(CPP_FLAGS) $(CPP_USE_PCH) /c $<
|
||||||
|
|
||||||
{..\generated\incls}.cpp.obj::
|
{..\generated\incls}.cpp.obj::
|
||||||
|
@ -3655,6 +3655,12 @@ class CommandLineFlags {
|
|||||||
manageable(bool, PrintConcurrentLocks, false, \
|
manageable(bool, PrintConcurrentLocks, false, \
|
||||||
"Print java.util.concurrent locks in thread dump") \
|
"Print java.util.concurrent locks in thread dump") \
|
||||||
\
|
\
|
||||||
|
diagnostic(bool, TransmitErrorReport, false, \
|
||||||
|
"Enable error report transmission on erroneous termination") \
|
||||||
|
\
|
||||||
|
diagnostic(ccstr, ErrorReportServer, NULL, \
|
||||||
|
"Override built-in error report server address") \
|
||||||
|
\
|
||||||
/* Shared spaces */ \
|
/* Shared spaces */ \
|
||||||
\
|
\
|
||||||
product(bool, UseSharedSpaces, true, \
|
product(bool, UseSharedSpaces, true, \
|
||||||
|
@ -245,6 +245,10 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
|
|||||||
" by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER;
|
" by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *Abstract_VM_Version::vm_build_user() {
|
||||||
|
return HOTSPOT_BUILD_USER;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int Abstract_VM_Version::jvm_version() {
|
unsigned int Abstract_VM_Version::jvm_version() {
|
||||||
return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
|
return ((Abstract_VM_Version::vm_major_version() & 0xFF) << 24) |
|
||||||
((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
|
((Abstract_VM_Version::vm_minor_version() & 0xFF) << 16) |
|
||||||
|
@ -59,6 +59,7 @@ class Abstract_VM_Version: AllStatic {
|
|||||||
static const char* vm_info_string();
|
static const char* vm_info_string();
|
||||||
static const char* vm_release();
|
static const char* vm_release();
|
||||||
static const char* vm_platform_string();
|
static const char* vm_platform_string();
|
||||||
|
static const char* vm_build_user();
|
||||||
|
|
||||||
static int vm_major_version() { assert(_initialized, "not initialized"); return _vm_major_version; }
|
static int vm_major_version() { assert(_initialized, "not initialized"); return _vm_major_version; }
|
||||||
static int vm_minor_version() { assert(_initialized, "not initialized"); return _vm_minor_version; }
|
static int vm_minor_version() { assert(_initialized, "not initialized"); return _vm_minor_version; }
|
||||||
|
32
hotspot/src/share/vm/utilities/errorReporter.cpp
Normal file
32
hotspot/src/share/vm/utilities/errorReporter.cpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011, 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.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "precompiled.hpp"
|
||||||
|
#include "utilities/errorReporter.hpp"
|
||||||
|
|
||||||
|
ErrorReporter::ErrorReporter() {}
|
||||||
|
|
||||||
|
void ErrorReporter::call(FILE* fd, char* buffer, int length) {
|
||||||
|
}
|
||||||
|
|
39
hotspot/src/share/vm/utilities/errorReporter.hpp
Normal file
39
hotspot/src/share/vm/utilities/errorReporter.hpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011, 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.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SHARE_VM_UTILITIES_ERRORREPORTER_HPP
|
||||||
|
#define SHARE_VM_UTILITIES_ERRORREPORTER_HPP
|
||||||
|
|
||||||
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
|
||||||
|
class ErrorReporter : public StackObj {
|
||||||
|
|
||||||
|
public:
|
||||||
|
ErrorReporter();
|
||||||
|
~ErrorReporter(){};
|
||||||
|
|
||||||
|
void call(FILE* fd, char *buffer, int length);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ndef SHARE_VM_UTILITIES_ERRORREPORTER_HPP
|
@ -314,6 +314,11 @@ fileStream::fileStream(const char* file_name) {
|
|||||||
_need_close = true;
|
_need_close = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fileStream::fileStream(const char* file_name, const char* opentype) {
|
||||||
|
_file = fopen(file_name, opentype);
|
||||||
|
_need_close = true;
|
||||||
|
}
|
||||||
|
|
||||||
void fileStream::write(const char* s, size_t len) {
|
void fileStream::write(const char* s, size_t len) {
|
||||||
if (_file != NULL) {
|
if (_file != NULL) {
|
||||||
// Make an unused local variable to avoid warning from gcc 4.x compiler.
|
// Make an unused local variable to avoid warning from gcc 4.x compiler.
|
||||||
@ -322,6 +327,25 @@ void fileStream::write(const char* s, size_t len) {
|
|||||||
update_position(s, len);
|
update_position(s, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long fileStream::fileSize() {
|
||||||
|
long size = -1;
|
||||||
|
if (_file != NULL) {
|
||||||
|
long pos = ::ftell(_file);
|
||||||
|
if (::fseek(_file, 0, SEEK_END) == 0) {
|
||||||
|
size = ::ftell(_file);
|
||||||
|
}
|
||||||
|
::fseek(_file, pos, SEEK_SET);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* fileStream::readln(char *data, int count ) {
|
||||||
|
char * ret = ::fgets(data, count, _file);
|
||||||
|
//Get rid of annoying \n char
|
||||||
|
data[::strlen(data)-1] = '\0';
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
fileStream::~fileStream() {
|
fileStream::~fileStream() {
|
||||||
if (_file != NULL) {
|
if (_file != NULL) {
|
||||||
if (_need_close) fclose(_file);
|
if (_need_close) fclose(_file);
|
||||||
|
@ -159,10 +159,17 @@ class fileStream : public outputStream {
|
|||||||
bool _need_close;
|
bool _need_close;
|
||||||
public:
|
public:
|
||||||
fileStream(const char* file_name);
|
fileStream(const char* file_name);
|
||||||
|
fileStream(const char* file_name, const char* opentype);
|
||||||
fileStream(FILE* file) { _file = file; _need_close = false; }
|
fileStream(FILE* file) { _file = file; _need_close = false; }
|
||||||
~fileStream();
|
~fileStream();
|
||||||
bool is_open() const { return _file != NULL; }
|
bool is_open() const { return _file != NULL; }
|
||||||
|
void set_need_close(bool b) { _need_close = b;}
|
||||||
virtual void write(const char* c, size_t len);
|
virtual void write(const char* c, size_t len);
|
||||||
|
size_t read(void *data, size_t size, size_t count) { return ::fread(data, size, count, _file); }
|
||||||
|
char* readln(char *data, int count);
|
||||||
|
int eof() { return feof(_file); }
|
||||||
|
long fileSize();
|
||||||
|
void rewind() { ::rewind(_file); }
|
||||||
void flush();
|
void flush();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "utilities/debug.hpp"
|
#include "utilities/debug.hpp"
|
||||||
#include "utilities/decoder.hpp"
|
#include "utilities/decoder.hpp"
|
||||||
#include "utilities/defaultStream.hpp"
|
#include "utilities/defaultStream.hpp"
|
||||||
|
#include "utilities/errorReporter.hpp"
|
||||||
#include "utilities/top.hpp"
|
#include "utilities/top.hpp"
|
||||||
#include "utilities/vmError.hpp"
|
#include "utilities/vmError.hpp"
|
||||||
|
|
||||||
@ -769,6 +770,7 @@ void VMError::report_and_die() {
|
|||||||
// then save detailed information in log file (verbose = true).
|
// then save detailed information in log file (verbose = true).
|
||||||
static bool out_done = false; // done printing to standard out
|
static bool out_done = false; // done printing to standard out
|
||||||
static bool log_done = false; // done saving error log
|
static bool log_done = false; // done saving error log
|
||||||
|
static bool transmit_report_done = false; // done error reporting
|
||||||
static fdStream log; // error log
|
static fdStream log; // error log
|
||||||
|
|
||||||
if (SuppressFatalErrorMessage) {
|
if (SuppressFatalErrorMessage) {
|
||||||
@ -859,7 +861,7 @@ void VMError::report_and_die() {
|
|||||||
bool copy_ok =
|
bool copy_ok =
|
||||||
Arguments::copy_expand_pid(ErrorFile, strlen(ErrorFile), buffer, sizeof(buffer));
|
Arguments::copy_expand_pid(ErrorFile, strlen(ErrorFile), buffer, sizeof(buffer));
|
||||||
if (copy_ok) {
|
if (copy_ok) {
|
||||||
fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
fd = open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,7 +872,7 @@ void VMError::report_and_die() {
|
|||||||
// so use the default name in the current directory
|
// so use the default name in the current directory
|
||||||
jio_snprintf(&buffer[len], sizeof(buffer)-len, "%shs_err_pid%u.log",
|
jio_snprintf(&buffer[len], sizeof(buffer)-len, "%shs_err_pid%u.log",
|
||||||
os::file_separator(), os::current_process_id());
|
os::file_separator(), os::current_process_id());
|
||||||
fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
fd = open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
@ -879,7 +881,7 @@ void VMError::report_and_die() {
|
|||||||
if (tmpdir != NULL && tmpdir[0] != '\0') {
|
if (tmpdir != NULL && tmpdir[0] != '\0') {
|
||||||
jio_snprintf(buffer, sizeof(buffer), "%s%shs_err_pid%u.log",
|
jio_snprintf(buffer, sizeof(buffer), "%s%shs_err_pid%u.log",
|
||||||
tmpdir, os::file_separator(), os::current_process_id());
|
tmpdir, os::file_separator(), os::current_process_id());
|
||||||
fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
fd = open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,6 +894,9 @@ void VMError::report_and_die() {
|
|||||||
} else {
|
} else {
|
||||||
out.print_raw_cr("# Can not save log file, dump to screen..");
|
out.print_raw_cr("# Can not save log file, dump to screen..");
|
||||||
log.set_fd(defaultStream::output_fd());
|
log.set_fd(defaultStream::output_fd());
|
||||||
|
/* Error reporting currently needs dumpfile.
|
||||||
|
* Maybe implement direct streaming in the future.*/
|
||||||
|
transmit_report_done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -900,6 +905,16 @@ void VMError::report_and_die() {
|
|||||||
first_error->_current_step = 0; // reset current_step
|
first_error->_current_step = 0; // reset current_step
|
||||||
first_error->_current_step_info = ""; // reset current_step string
|
first_error->_current_step_info = ""; // reset current_step string
|
||||||
|
|
||||||
|
// Run error reporting to determine whether or not to report the crash.
|
||||||
|
if (!transmit_report_done && should_report_bug(first_error->_id)) {
|
||||||
|
transmit_report_done = true;
|
||||||
|
FILE* hs_err = ::fdopen(log.fd(), "r");
|
||||||
|
if (NULL != hs_err) {
|
||||||
|
ErrorReporter er;
|
||||||
|
er.call(hs_err, buffer, O_BUFLEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (log.fd() != defaultStream::output_fd()) {
|
if (log.fd() != defaultStream::output_fd()) {
|
||||||
close(log.fd());
|
close(log.fd());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user