diff --git a/make/linux/makefiles/gcc.make b/make/linux/makefiles/gcc.make index 2ba9228f6b98179b5f7cdaaf6f239fecba277073..1d7be454fd124eb69d74e7bd7f11ab5048e07fc3 100644 --- a/make/linux/makefiles/gcc.make +++ b/make/linux/makefiles/gcc.make @@ -42,11 +42,14 @@ CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) # check for precompiled headers support ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" +# Allow the user to turn off precompiled headers from the command line. +ifneq ($(USE_PRECOMPILED_HEADER),0) USE_PRECOMPILED_HEADER=1 PRECOMPILED_HEADER_DIR=. PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch endif +endif #------------------------------------------------------------------------ @@ -150,6 +153,11 @@ ifneq ("${CC_VER_MAJOR}", "2") DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) endif +# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. +ifneq ($(USE_PRECOMPILED_HEADER),1) +CFLAGS += -DDONT_USE_PRECOMPILED_HEADER +endif + #------------------------------------------------------------------------ # Linker flags diff --git a/make/linux/makefiles/sparcWorks.make b/make/linux/makefiles/sparcWorks.make index f0a9901f70eb0006cf4f3b84ae17366d47d8cc77..d6fe9679b4bb473170e7becf1a6bc530a6e1bc16 100644 --- a/make/linux/makefiles/sparcWorks.make +++ b/make/linux/makefiles/sparcWorks.make @@ -79,6 +79,9 @@ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d) endif +# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. +CFLAGS += -DDONT_USE_PRECOMPILED_HEADER + #------------------------------------------------------------------------ # Linker flags diff --git a/make/solaris/makefiles/gcc.make b/make/solaris/makefiles/gcc.make index 5a2072d96e1a999a6ef45ab9964f969c0f0777d8..b0cdfc9a23187bfe272995fb5514ce9aa813876a 100644 --- a/make/solaris/makefiles/gcc.make +++ b/make/solaris/makefiles/gcc.make @@ -47,11 +47,14 @@ $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) # check for precompiled headers support ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" +# Allow the user to turn off precompiled headers from the command line. +ifneq ($(USE_PRECOMPILED_HEADER),0) USE_PRECOMPILED_HEADER=1 PRECOMPILED_HEADER_DIR=. PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch endif +endif #------------------------------------------------------------------------ @@ -138,6 +141,11 @@ ifneq ("${CC_VER_MAJOR}", "2") DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) endif +# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. +ifneq ($(USE_PRECOMPILED_HEADER),1) +CFLAGS += -DDONT_USE_PRECOMPILED_HEADER +endif + #------------------------------------------------------------------------ # Linker flags diff --git a/make/solaris/makefiles/sparcWorks.make b/make/solaris/makefiles/sparcWorks.make index 4fed15513165cf5de9aa6d15468fd22a7951b12c..b3b0d514570192b125d2b2997d8a799c8fa33d19 100644 --- a/make/solaris/makefiles/sparcWorks.make +++ b/make/solaris/makefiles/sparcWorks.make @@ -150,6 +150,9 @@ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d) endif +# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. +CFLAGS += -DDONT_USE_PRECOMPILED_HEADER + ################################################ # Begin current (>=5.9) Forte compiler options # ################################################# diff --git a/make/windows/makefiles/debug.make b/make/windows/makefiles/debug.make index 73f5a397fa394a995f66dd5034a81758e658e688..0d6ea1be7a13ea370bb8fb8495c46747d465992b 100644 --- a/make/windows/makefiles/debug.make +++ b/make/windows/makefiles/debug.make @@ -28,7 +28,12 @@ AOUT=$(HS_FNAME) SAWINDBG=sawindbg.dll GENERATED=../generated -default:: _build_pch_file.obj $(AOUT) checkAndBuildSA +# Allow the user to turn off precompiled headers from the command line. +!if "$(USE_PRECOMPILED_HEADER)" != "0" +BUILD_PCH_FILE=_build_pch_file.obj +!endif + +default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA !include ../local.make !include compile.make diff --git a/make/windows/makefiles/fastdebug.make b/make/windows/makefiles/fastdebug.make index a93c59cfc013f11e453033a7bc1d3ad6281efc3c..e38129766f6b3882a3799f2f5355c0e749532a38 100644 --- a/make/windows/makefiles/fastdebug.make +++ b/make/windows/makefiles/fastdebug.make @@ -28,7 +28,12 @@ AOUT=$(HS_FNAME) SAWINDBG=sawindbg.dll GENERATED=../generated -default:: _build_pch_file.obj $(AOUT) checkAndBuildSA +# Allow the user to turn off precompiled headers from the command line. +!if "$(USE_PRECOMPILED_HEADER)" != "0" +BUILD_PCH_FILE=_build_pch_file.obj +!endif + +default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA !include ../local.make !include compile.make diff --git a/make/windows/makefiles/product.make b/make/windows/makefiles/product.make index 73c01536b12e268dcf6d2f63c25f0f549b791480..530f1b13377187d69372f9124b7cfc5ee7a84dab 100644 --- a/make/windows/makefiles/product.make +++ b/make/windows/makefiles/product.make @@ -27,7 +27,12 @@ HS_FNAME=$(HS_INTERNAL_NAME).dll AOUT=$(HS_FNAME) GENERATED=../generated -default:: _build_pch_file.obj $(AOUT) checkAndBuildSA +# Allow the user to turn off precompiled headers from the command line. +!if "$(USE_PRECOMPILED_HEADER)" != "0" +BUILD_PCH_FILE=_build_pch_file.obj +!endif + +default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA !include ../local.make !include compile.make diff --git a/make/windows/makefiles/vm.make b/make/windows/makefiles/vm.make index fb82e9c76137899e7e69586492badc7049a1ab40..a91a70fc4612ca4159e89cee56025f2c39aad569 100644 --- a/make/windows/makefiles/vm.make +++ b/make/windows/makefiles/vm.make @@ -128,7 +128,13 @@ CPP_INCLUDE_DIRS=\ /I "$(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm" \ /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm" +CPP_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER + +!if "$(USE_PRECOMPILED_HEADER)" != "0" CPP_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp" +!else +CPP_USE_PCH=$(CPP_DONT_USE_PCH) +!endif # Where to find the source code for the virtual machine VM_PATH=../generated @@ -164,31 +170,31 @@ VM_PATH={$(VM_PATH)} # Special case files not using precompiled header files. c1_RInfo_$(Platform_arch).obj: $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp os_windows.obj: $(WorkSpace)\src\os\windows\vm\os_windows.cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\os_windows.cpp os_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\os_windows_$(Platform_arch).cpp osThread_windows.obj: $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\osThread_windows.cpp conditionVar_windows.obj: $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os\windows\vm\conditionVar_windows.cpp getThread_windows_$(Platform_arch).obj: $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\os_cpu\windows_$(Platform_arch)\vm\getThread_windows_$(Platform_arch).cpp opcodes.obj: $(WorkSpace)\src\share\vm\opto\opcodes.cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\opto\opcodes.cpp bytecodeInterpreter.obj: $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp - $(CPP) $(CPP_FLAGS) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpreter.cpp bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp - $(CPP) $(CPP_FLAGS) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp + $(CPP) $(CPP_FLAGS) $(CPP_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp # Default rules for the Virtual Machine {$(WorkSpace)\src\share\vm\c1}.cpp.obj:: diff --git a/src/share/vm/ci/ciCallProfile.hpp b/src/share/vm/ci/ciCallProfile.hpp index 24062d2b5846216871306f2ee3d855d10121d326..f9d10ed16b501888ebfe474cc140715d457490c5 100644 --- a/src/share/vm/ci/ciCallProfile.hpp +++ b/src/share/vm/ci/ciCallProfile.hpp @@ -26,6 +26,7 @@ #define SHARE_VM_CI_CICALLPROFILE_HPP #include "ci/ciClassList.hpp" +#include "memory/allocation.hpp" // ciCallProfile // diff --git a/src/share/vm/ci/ciMethodHandle.hpp b/src/share/vm/ci/ciMethodHandle.hpp index 3b9ea68337dd8ae6156d3232f11f84d0566a3510..7573bffb9a5620be4e9098599d3d8894dd52b5e8 100644 --- a/src/share/vm/ci/ciMethodHandle.hpp +++ b/src/share/vm/ci/ciMethodHandle.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_CI_CIMETHODHANDLE_HPP #define SHARE_VM_CI_CIMETHODHANDLE_HPP +#include "ci/ciInstance.hpp" #include "prims/methodHandles.hpp" // ciMethodHandle diff --git a/src/share/vm/classfile/placeholders.hpp b/src/share/vm/classfile/placeholders.hpp index 4c77fefff74ea4750d73d3015fe254a6b302b0e0..82c7aaffff87d55df273dbbf19fe8dcedfe7c23c 100644 --- a/src/share/vm/classfile/placeholders.hpp +++ b/src/share/vm/classfile/placeholders.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_CLASSFILE_PLACEHOLDERS_HPP #define SHARE_VM_CLASSFILE_PLACEHOLDERS_HPP +#include "runtime/thread.hpp" #include "utilities/hashtable.hpp" class PlaceholderEntry; diff --git a/src/share/vm/code/vtableStubs.hpp b/src/share/vm/code/vtableStubs.hpp index 6b2b79596e2671cfc5afdfca0817286a4bed8c46..82caf1193fe809e01398f96e7a53d564e19a75fd 100644 --- a/src/share/vm/code/vtableStubs.hpp +++ b/src/share/vm/code/vtableStubs.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_CODE_VTABLESTUBS_HPP #define SHARE_VM_CODE_VTABLESTUBS_HPP +#include "code/vmreg.hpp" #include "memory/allocation.hpp" // A VtableStub holds an individual code stub for a pair (vtable index, #args) for either itables or vtables diff --git a/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp b/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp index be7abd60655ff11595765e067b822a4c8e6f4ef0..6d1504a8653e8169b7dd9b596021185efaf0a47f 100644 --- a/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp +++ b/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp @@ -26,6 +26,7 @@ #define SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARGCALLOCBUFFER_HPP #include "memory/allocation.hpp" +#include "memory/blockOffsetTable.hpp" #include "memory/threadLocalAllocBuffer.hpp" #include "utilities/globalDefinitions.hpp" diff --git a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp index 9f8c2042bd603180392691871f502a9203d44951..e6a07310dbf99ec9bd45b99aca75faee374be93c 100644 --- a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp +++ b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARMARKBITMAP_HPP #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARMARKBITMAP_HPP +#include "memory/memRegion.hpp" #include "gc_implementation/parallelScavenge/psVirtualspace.hpp" #include "utilities/bitMap.inline.hpp" diff --git a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.inline.hpp b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.inline.hpp index e94f75c6e2707ad8885bc788f9fb8ed9ea67c521..e7f1dfa5470568bcb085f35f052c58eeece46d90 100644 --- a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.inline.hpp +++ b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.inline.hpp @@ -25,6 +25,8 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARMARKBITMAP_INLINE_HPP #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARMARKBITMAP_INLINE_HPP +#include "oops/oop.hpp" + inline bool ParMarkBitMap::mark_obj(oop obj) { diff --git a/src/share/vm/interpreter/oopMapCache.hpp b/src/share/vm/interpreter/oopMapCache.hpp index 4c1f0147f9369e95aaa4dc307294da19b5809d5b..068e4d3b9825f05ba68497c8b14be685c885436d 100644 --- a/src/share/vm/interpreter/oopMapCache.hpp +++ b/src/share/vm/interpreter/oopMapCache.hpp @@ -26,6 +26,7 @@ #define SHARE_VM_INTERPRETER_OOPMAPCACHE_HPP #include "oops/generateOopMap.hpp" +#include "runtime/mutex.hpp" // A Cache for storing (method, bci) -> oopMap. // The memory management system uses the cache when locating object diff --git a/src/share/vm/libadt/vectset.cpp b/src/share/vm/libadt/vectset.cpp index efb1d6638dc1589a63482865abd21570eeb23c57..1dd9f4e26e3ac02588526c4dc681364971d3d0d1 100644 --- a/src/share/vm/libadt/vectset.cpp +++ b/src/share/vm/libadt/vectset.cpp @@ -249,13 +249,13 @@ int VectorSet::disjoint(const Set &set) const const VectorSet &s = *(set.asVectorSet()); // NOTE: The intersection is never any larger than the smallest set. - register uint small = ((size