# HG changeset patch # User Laurent Daynes # Date 1350643906 -7200 # Node ID 94c6cbbd6214351892d62a70f406bd8ada4f913a # Parent 2b5eab0df11102fd0dcfe2c643c2fd551cc6b438# Parent 54821565b742e33f996ed068c030bd0e3b284a38 Merge diff -r 54821565b742 -r 94c6cbbd6214 make/linux/Makefile --- a/make/linux/Makefile Fri Oct 12 16:47:18 2012 -0700 +++ b/make/linux/Makefile Fri Oct 19 12:51:46 2012 +0200 @@ -371,10 +371,10 @@ clean_docs: rm -rf $(SUBDIR_DOCS) -clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark: +clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_graal: rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) -clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs +clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs clean_graal include $(GAMMADIR)/make/cscope.make diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/Makefile --- a/make/solaris/Makefile Fri Oct 12 16:47:18 2012 -0700 +++ b/make/solaris/Makefile Fri Oct 19 12:51:46 2012 +0200 @@ -158,12 +158,14 @@ SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) SUBDIRS_KERNEL = $(addprefix $(OSNAME)_$(BUILDARCH)_kernel/,$(TARGETS)) +SUBDIRS_GRAAL = $(addprefix $(OSNAME)_$(BUILDARCH)_graal/,$(TARGETS)) TARGETS_C2 = $(TARGETS) TARGETS_C1 = $(addsuffix 1,$(TARGETS)) TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) TARGETS_CORE = $(addsuffix core,$(TARGETS)) TARGETS_KERNEL = $(addsuffix kernel,$(TARGETS)) +TARGETS_GRAAL = $(addsuffix graal,$(TARGETS)) BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) @@ -180,6 +182,7 @@ @echo " $(TARGETS_C2)" @echo " $(TARGETS_C1)" @echo " $(TARGETS_CORE)" + @echo " $(TARGETS_GRAAL)" checks: check_os_version check_j2se_version @@ -233,6 +236,10 @@ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks $(BUILDTREE) VARIANT=kernel +$(SUBDIRS_GRAAL): $(BUILDTREE_MAKE) + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks + $(BUILDTREE) VARIANT=graal + # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME $(TARGETS_C2): $(SUBDIRS_C2) @@ -270,11 +277,18 @@ cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS) install endif +$(TARGETS_GRAAL): $(SUBDIRS_GRAAL) + cd $(OSNAME)_$(BUILDARCH)_graal/$(patsubst %graal,%,$@) && $(MAKE) $(MFLAGS) +ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_graal/$(patsubst %graal,%,$@) && $(MAKE) $(MFLAGS) install +endif + # Just build the tree, and nothing else: tree: $(SUBDIRS_C2) tree1: $(SUBDIRS_C1) treecore: $(SUBDIRS_CORE) treekernel: $(SUBDIRS_KERNEL) +treegraal: $(SUBDIRS_GRAAL) # Doc target. This is the same for all build options. # Hence create a docs directory beside ...$(ARCH)_[...] @@ -294,17 +308,17 @@ clean_docs: rm -rf $(SUBDIR_DOCS) -clean_compiler1 clean_compiler2 clean_core clean_kernel: +clean_compiler1 clean_compiler2 clean_core clean_kernel clean_graal: rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) -clean: clean_compiler2 clean_compiler1 clean_core clean_docs clean_kernel +clean: clean_compiler2 clean_compiler1 clean_core clean_docs clean_kernel clean_graal include $(GAMMADIR)/make/cscope.make #------------------------------------------------------------------------------- .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) -.PHONY: tree tree1 treecore -.PHONY: all compiler1 compiler2 core -.PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs +.PHONY: tree tree1 treecore treegraal +.PHONY: all compiler1 compiler2 core graal +.PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs clean_graal .PHONY: checks check_os_version check_j2se_version diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/makefiles/debug.make --- a/make/solaris/makefiles/debug.make Fri Oct 12 16:47:18 2012 -0700 +++ b/make/solaris/makefiles/debug.make Fri Oct 19 12:51:46 2012 +0200 @@ -42,6 +42,9 @@ # Linker mapfiles MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers \ $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-debug +#ifdef GRAAL +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-graal +#endif # This mapfile is only needed when compiling with dtrace support, # and mustn't be otherwise. diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/makefiles/fastdebug.make --- a/make/solaris/makefiles/fastdebug.make Fri Oct 12 16:47:18 2012 -0700 +++ b/make/solaris/makefiles/fastdebug.make Fri Oct 19 12:51:46 2012 +0200 @@ -113,6 +113,9 @@ # Linker mapfiles MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers \ $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-debug +#ifdef GRAAL +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-graal +#endif # This mapfile is only needed when compiling with dtrace support, # and mustn't be otherwise. diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/makefiles/graal.make --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/solaris/makefiles/graal.make Fri Oct 19 12:51:46 2012 +0200 @@ -0,0 +1,32 @@ +# +# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2008, 2010 Red Hat, Inc. +# 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. +# +# + +# Sets make macros for making Graal version of VM + +TYPE = GRAAL + +VM_SUBDIR = graal + +CFLAGS += -DGRAAL -DCOMPILER1 diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/makefiles/jvmg.make --- a/make/solaris/makefiles/jvmg.make Fri Oct 12 16:47:18 2012 -0700 +++ b/make/solaris/makefiles/jvmg.make Fri Oct 19 12:51:46 2012 +0200 @@ -46,6 +46,9 @@ # Linker mapfiles MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers \ $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-debug +#ifdef GRAAL +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-graal +#endif # This mapfile is only needed when compiling with dtrace support, # and mustn't be otherwise. diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/makefiles/optimized.make --- a/make/solaris/makefiles/optimized.make Fri Oct 12 16:47:18 2012 -0700 +++ b/make/solaris/makefiles/optimized.make Fri Oct 19 12:51:46 2012 +0200 @@ -54,6 +54,9 @@ # Linker mapfiles MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers +#ifdef GRAAL +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-graal +#endif # This mapfile is only needed when compiling with dtrace support, # and mustn't be otherwise. diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/makefiles/product.make --- a/make/solaris/makefiles/product.make Fri Oct 12 16:47:18 2012 -0700 +++ b/make/solaris/makefiles/product.make Fri Oct 19 12:51:46 2012 +0200 @@ -64,6 +64,9 @@ # Linker mapfiles MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers +ifdef GRAAL +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-graal +endif ifndef USE_GCC # This mapfile is only needed when compiling with dtrace support, diff -r 54821565b742 -r 94c6cbbd6214 make/solaris/makefiles/vm.make --- a/make/solaris/makefiles/vm.make Fri Oct 12 16:47:18 2012 -0700 +++ b/make/solaris/makefiles/vm.make Fri Oct 19 12:51:46 2012 +0200 @@ -164,7 +164,7 @@ LIBJVM_G_DEBUGINFO = lib$(JVM)$(G_SUFFIX).debuginfo LIBJVM_G_DIZ = lib$(JVM)$(G_SUFFIX).diz -SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt +SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt graal SOURCE_PATHS=\ $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \ @@ -190,6 +190,11 @@ COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt COMPILER2_PATHS += $(GENERATED)/adfiles +GRAAL_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1) +GRAAL_PATHS += $(HS_COMMON_SRC)/share/vm/c1 +GRAAL_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/graal) +GRAAL_PATHS += $(HS_COMMON_SRC)/share/vm/graal + # Include dirs per type. Src_Dirs/CORE := $(CORE_PATHS) Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) @@ -197,12 +202,14 @@ Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) Src_Dirs/ZERO := $(CORE_PATHS) Src_Dirs/SHARK := $(CORE_PATHS) +Src_Dirs/GRAAL := $(CORE_PATHS) $(GRAAL_PATHS) Src_Dirs := $(Src_Dirs/$(TYPE)) COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\* COMPILER1_SPECIFIC_FILES := c1_\* SHARK_SPECIFIC_FILES := shark ZERO_SPECIFIC_FILES := zero +GRAAL_SPECIFIC_FILES := graal # Always exclude these. Src_Files_EXCLUDE := dtrace jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp @@ -214,6 +221,7 @@ Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) +Src_Files_EXCLUDE/GRAAL := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE)) diff -r 54821565b742 -r 94c6cbbd6214 mx/commands.py --- a/mx/commands.py Fri Oct 12 16:47:18 2012 -0700 +++ b/mx/commands.py Fri Oct 19 12:51:46 2012 +0200 @@ -276,7 +276,7 @@ def _arch(): machine = platform.uname()[4] - if machine in ['amd64', 'AMD64', 'x86_64']: + if machine in ['amd64', 'AMD64', 'x86_64', 'i86pc']: return 'amd64' mx.abort('unsupported or unknown machine type: ' + machine) diff -r 54821565b742 -r 94c6cbbd6214 src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Fri Oct 12 16:47:18 2012 -0700 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Fri Oct 19 12:51:46 2012 +0200 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "runtime/javaCalls.hpp" #include "graal/graalCompiler.hpp" #include "graal/graalCodeInstaller.hpp" #include "graal/graalJavaAccess.hpp" diff -r 54821565b742 -r 94c6cbbd6214 src/share/vm/graal/graalCompiler.cpp --- a/src/share/vm/graal/graalCompiler.cpp Fri Oct 12 16:47:18 2012 -0700 +++ b/src/share/vm/graal/graalCompiler.cpp Fri Oct 19 12:51:46 2012 +0200 @@ -22,6 +22,8 @@ */ #include "precompiled.hpp" +#include "memory/oopFactory.hpp" +#include "runtime/javaCalls.hpp" #include "graal/graalCompiler.hpp" #include "graal/graalJavaAccess.hpp" #include "graal/graalVMToCompiler.hpp" diff -r 54821565b742 -r 94c6cbbd6214 src/share/vm/graal/graalCompilerToVM.cpp --- a/src/share/vm/graal/graalCompilerToVM.cpp Fri Oct 12 16:47:18 2012 -0700 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Fri Oct 19 12:51:46 2012 +0200 @@ -23,6 +23,9 @@ #include "precompiled.hpp" #include "runtime/fieldDescriptor.hpp" +#include "memory/oopFactory.hpp" +#include "oops/generateOopMap.hpp" +#include "runtime/javaCalls.hpp" #include "c1/c1_Runtime1.hpp" #include "ci/ciMethodData.hpp" #include "compiler/compileBroker.hpp" @@ -33,8 +36,7 @@ #include "graal/graalCodeInstaller.hpp" #include "graal/graalVMToCompiler.hpp" #include "graal/graalVmIds.hpp" -#include "memory/oopFactory.hpp" -#include "oops/generateOopMap.hpp" + methodOop getMethodFromHotSpotMethod(jobject hotspot_method) { return getMethodFromHotSpotMethod(JNIHandles::resolve(hotspot_method)); diff -r 54821565b742 -r 94c6cbbd6214 src/share/vm/graal/graalInterpreterToVM.cpp --- a/src/share/vm/graal/graalInterpreterToVM.cpp Fri Oct 12 16:47:18 2012 -0700 +++ b/src/share/vm/graal/graalInterpreterToVM.cpp Fri Oct 19 12:51:46 2012 +0200 @@ -23,6 +23,8 @@ #include "precompiled.hpp" #include "prims/jni.h" +#include "runtime/javaCalls.hpp" +#include "memory/oopFactory.hpp" #include "graal/graalInterpreterToVM.hpp" #include "graal/graalCompiler.hpp" #include "graal/graalCompilerToVM.hpp" diff -r 54821565b742 -r 94c6cbbd6214 src/share/vm/graal/graalRuntime.cpp --- a/src/share/vm/graal/graalRuntime.cpp Fri Oct 12 16:47:18 2012 -0700 +++ b/src/share/vm/graal/graalRuntime.cpp Fri Oct 19 12:51:46 2012 +0200 @@ -22,7 +22,8 @@ */ #include "precompiled.hpp" - +#include "runtime/interfaceSupport.hpp" +#include "prims/jvm.h" #include "graal/graalVMToCompiler.hpp" // JVM_InitializeGraalRuntime diff -r 54821565b742 -r 94c6cbbd6214 src/share/vm/graal/graalRuntime.hpp --- a/src/share/vm/graal/graalRuntime.hpp Fri Oct 12 16:47:18 2012 -0700 +++ b/src/share/vm/graal/graalRuntime.hpp Fri Oct 19 12:51:46 2012 +0200 @@ -24,14 +24,4 @@ #ifndef SHARE_VM_GRAAL_GRAAL_RUNTIME_HPP #define SHARE_VM_GRAAL_GRAAL_RUNTIME_HPP -class GraalRuntime : public AllStatic { - -private: - jobject _runtimeObject; - -public: - static jobject instance() { return _runtimeObject; } - -}; - #endif // SHARE_VM_GRAAL_GRAAL_RUNTIME_HPP