--- a/make/linux/makefiles/gcc.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/linux/makefiles/gcc.make Wed Dec 01 15:04:06 2010 +0100
@@ -42,10 +42,13 @@ CC_VER_MINOR := $(shell $(CC) -dumpversi
# 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
@@ -148,6 +151,11 @@ endif
# Flags for generating make dependency flags.
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
#------------------------------------------------------------------------
--- a/make/linux/makefiles/sparcWorks.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/linux/makefiles/sparcWorks.make Wed Dec 01 15:04:06 2010 +0100
@@ -79,6 +79,9 @@ DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%
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
--- a/make/solaris/makefiles/gcc.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/solaris/makefiles/gcc.make Wed Dec 01 15:04:06 2010 +0100
@@ -47,10 +47,13 @@ C_COMPILER_REV := \
# 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
@@ -136,6 +139,11 @@ OPT_CFLAGS/NOOPT=-O0
# Flags for generating make dependency flags.
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
#------------------------------------------------------------------------
--- a/make/solaris/makefiles/sparcWorks.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/solaris/makefiles/sparcWorks.make Wed Dec 01 15:04:06 2010 +0100
@@ -150,6 +150,9 @@ DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%
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 #
#################################################
--- a/make/windows/makefiles/debug.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/windows/makefiles/debug.make Wed Dec 01 15:04:06 2010 +0100
@@ -28,7 +28,12 @@ SAWINDBG=sawindbg.dll
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
--- a/make/windows/makefiles/fastdebug.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/windows/makefiles/fastdebug.make Wed Dec 01 15:04:06 2010 +0100
@@ -28,7 +28,12 @@ SAWINDBG=sawindbg.dll
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
--- a/make/windows/makefiles/product.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/windows/makefiles/product.make Wed Dec 01 15:04:06 2010 +0100
@@ -27,7 +27,12 @@ AOUT=$(HS_FNAME)
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
--- a/make/windows/makefiles/vm.make Thu Dec 02 14:00:03 2010 -0500
+++ b/make/windows/makefiles/vm.make Wed Dec 01 15:04:06 2010 +0100
@@ -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::
--- a/src/share/vm/ci/ciCallProfile.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/ci/ciCallProfile.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -26,6 +26,7 @@
#define SHARE_VM_CI_CICALLPROFILE_HPP
#include "ci/ciClassList.hpp"
+#include "memory/allocation.hpp"
// ciCallProfile
//
--- a/src/share/vm/ci/ciMethodHandle.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/ci/ciMethodHandle.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -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
--- a/src/share/vm/classfile/placeholders.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/classfile/placeholders.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -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;
--- a/src/share/vm/code/vtableStubs.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/code/vtableStubs.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -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
--- a/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -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"
--- a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -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"
--- a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.inline.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.inline.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -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)
{
--- a/src/share/vm/interpreter/oopMapCache.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/interpreter/oopMapCache.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -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
--- a/src/share/vm/libadt/vectset.cpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/libadt/vectset.cpp Wed Dec 01 15:04:06 2010 +0100
@@ -249,13 +249,13 @@ int VectorSet::disjoint(const Set &set)
const VectorSet &s = *(set.asVectorSet());
// NOTE: The intersection is never any larger than the smallest set.
- register uint small = ((size<s.size)?size:s.size);
- register uint32 *u1 = data; // Pointer to the destination data
- register uint32 *u2 = s.data; // Pointer to the source data
- for( uint i=0; i<small; i++) // For data in set
- if( *u1++ & *u2++ ) // If any elements in common
- return 0; // Then not disjoint
- return 1; // Else disjoint
+ register uint small_size = ((size<s.size)?size:s.size);
+ register uint32 *u1 = data; // Pointer to the destination data
+ register uint32 *u2 = s.data; // Pointer to the source data
+ for( uint i=0; i<small_size; i++) // For data in set
+ if( *u1++ & *u2++ ) // If any elements in common
+ return 0; // Then not disjoint
+ return 1; // Else disjoint
}
//------------------------------operator<--------------------------------------
--- a/src/share/vm/memory/threadLocalAllocBuffer.inline.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/memory/threadLocalAllocBuffer.inline.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -28,6 +28,7 @@
#include "gc_interface/collectedHeap.hpp"
#include "memory/threadLocalAllocBuffer.hpp"
#include "runtime/atomic.hpp"
+#include "runtime/thread.hpp"
#include "utilities/copy.hpp"
inline HeapWord* ThreadLocalAllocBuffer::allocate(size_t size) {
--- a/src/share/vm/precompiled.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/precompiled.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -21,6 +21,10 @@
* questions.
*
*/
+
+// Precompiled headers are turned off for Sun Studion,
+// or if the user passes USE_PRECOMPILED_HEADER=0 to the makefiles.
+#ifndef DONT_USE_PRECOMPILED_HEADER
# include "asm/assembler.hpp"
# include "asm/assembler.inline.hpp"
@@ -323,3 +327,5 @@
# include "gc_implementation/shared/gcAdaptivePolicyCounters.hpp"
# include "gc_implementation/shared/gcPolicyCounters.hpp"
#endif // SERIALGC
+
+#endif // !DONT_USE_PRECOMPILED_HEADER
--- a/src/share/vm/prims/jvmtiExport.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/prims/jvmtiExport.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -25,7 +25,6 @@
#ifndef SHARE_VM_PRIMS_JVMTIEXPORT_HPP
#define SHARE_VM_PRIMS_JVMTIEXPORT_HPP
-#include "code/jvmticmlr.h"
#include "jvmtifiles/jvmti.h"
#include "memory/allocation.hpp"
#include "memory/iterator.hpp"
@@ -35,6 +34,9 @@
#include "runtime/handles.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/growableArray.hpp"
+
+// Must be included after jvmti.h.
+#include "code/jvmticmlr.h"
// Forward declarations
--- a/src/share/vm/prims/jvmtiImpl.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/prims/jvmtiImpl.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -26,6 +26,7 @@
#define SHARE_VM_PRIMS_JVMTIIMPL_HPP
#ifndef JVMTI_KERNEL
+
#include "classfile/systemDictionary.hpp"
#include "jvmtifiles/jvmti.h"
#include "oops/objArrayOop.hpp"
@@ -35,7 +36,6 @@
#include "prims/jvmtiUtil.hpp"
#include "runtime/stackValueCollection.hpp"
#include "runtime/vm_operations.hpp"
-#endif
//
// Forward Declarations
@@ -417,6 +417,8 @@ public:
static void print();
};
+#endif // !JVMTI_KERNEL
+
// Utility macro that checks for NULL pointers:
#define NULL_CHECK(X, Y) if ((X) == NULL) { return (Y); }
--- a/src/share/vm/runtime/objectMonitor.hpp Thu Dec 02 14:00:03 2010 -0500
+++ b/src/share/vm/runtime/objectMonitor.hpp Wed Dec 01 15:04:06 2010 +0100
@@ -26,6 +26,7 @@
#define SHARE_VM_RUNTIME_OBJECTMONITOR_HPP
#include "runtime/os.hpp"
+#include "runtime/park.hpp"
#include "runtime/perfData.hpp"