8042195: Introduce umbrella header orderAccess.inline.hpp.
Reviewed-by: dholmes, kvn, stefank, twisti
--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -40,6 +40,7 @@
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/interfaceSupport.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/synchronizer.hpp"
--- a/hotspot/src/os/aix/vm/os_aix.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/aix/vm/os_aix.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -55,6 +55,7 @@
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/perfMemory.hpp"
#include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/os/aix/vm/os_aix.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/aix/vm/os_aix.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,12 +26,9 @@
#ifndef OS_AIX_VM_OS_AIX_INLINE_HPP
#define OS_AIX_VM_OS_AIX_INLINE_HPP
-#include "runtime/atomic.hpp"
+#include "runtime/atomic.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
-#ifdef TARGET_OS_ARCH_aix_ppc
-# include "atomic_aix_ppc.inline.hpp"
-# include "orderAccess_aix_ppc.inline.hpp"
-#endif
// System includes
--- a/hotspot/src/os/aix/vm/thread_aix.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/aix/vm/thread_aix.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,13 +26,10 @@
#ifndef OS_AIX_VM_THREAD_AIX_INLINE_HPP
#define OS_AIX_VM_THREAD_AIX_INLINE_HPP
-#include "runtime/atomic.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadLocalStorage.hpp"
-#include "atomic_aix_ppc.inline.hpp"
-#include "orderAccess_aix_ppc.inline.hpp"
#include "prefetch_aix_ppc.inline.hpp"
// Contains inlined functions for class Thread and ThreadLocalStorage
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -48,6 +48,7 @@
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/perfMemory.hpp"
#include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/os/bsd/vm/os_bsd.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/bsd/vm/os_bsd.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,15 +26,9 @@
#define OS_BSD_VM_OS_BSD_INLINE_HPP
#include "runtime/atomic.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "orderAccess_bsd_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_zero
-# include "orderAccess_bsd_zero.inline.hpp"
-#endif
-
// System includes
#include <unistd.h>
--- a/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -29,18 +29,12 @@
#error "This file should only be included from thread.inline.hpp"
#endif
-#include "runtime/atomic.hpp"
-#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadLocalStorage.hpp"
#ifdef TARGET_OS_ARCH_bsd_x86
-# include "atomic_bsd_x86.inline.hpp"
-# include "orderAccess_bsd_x86.inline.hpp"
# include "prefetch_bsd_x86.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_bsd_zero
-# include "atomic_bsd_zero.inline.hpp"
-# include "orderAccess_bsd_zero.inline.hpp"
# include "prefetch_bsd_zero.inline.hpp"
#endif
--- a/hotspot/src/os/linux/vm/os_linux.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/linux/vm/os_linux.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -49,6 +49,7 @@
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/perfMemory.hpp"
#include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/os/linux/vm/os_linux.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/linux/vm/os_linux.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,24 +26,9 @@
#define OS_LINUX_VM_OS_LINUX_INLINE_HPP
#include "runtime/atomic.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "orderAccess_linux_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_sparc
-# include "orderAccess_linux_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_zero
-# include "orderAccess_linux_zero.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_arm
-# include "orderAccess_linux_arm.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_ppc
-# include "orderAccess_linux_ppc.inline.hpp"
-#endif
-
// System includes
#include <unistd.h>
--- a/hotspot/src/os/linux/vm/thread_linux.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/linux/vm/thread_linux.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -29,33 +29,22 @@
#error "This file should only be included from thread.inline.hpp"
#endif
-#include "runtime/atomic.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadLocalStorage.hpp"
#ifdef TARGET_OS_ARCH_linux_x86
-# include "atomic_linux_x86.inline.hpp"
-# include "orderAccess_linux_x86.inline.hpp"
# include "prefetch_linux_x86.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_sparc
-# include "atomic_linux_sparc.inline.hpp"
-# include "orderAccess_linux_sparc.inline.hpp"
# include "prefetch_linux_sparc.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_zero
-# include "atomic_linux_zero.inline.hpp"
-# include "orderAccess_linux_zero.inline.hpp"
# include "prefetch_linux_zero.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_arm
-# include "atomic_linux_arm.inline.hpp"
-# include "orderAccess_linux_arm.inline.hpp"
# include "prefetch_linux_arm.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_ppc
-# include "atomic_linux_ppc.inline.hpp"
-# include "orderAccess_linux_ppc.inline.hpp"
# include "prefetch_linux_ppc.inline.hpp"
#endif
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -48,6 +48,7 @@
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/perfMemory.hpp"
#include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,15 +26,9 @@
#define OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP
#include "runtime/atomic.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "orderAccess_solaris_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_sparc
-# include "orderAccess_solaris_sparc.inline.hpp"
-#endif
-
// System includes
#include <sys/param.h>
#include <dlfcn.h>
--- a/hotspot/src/os/solaris/vm/thread_solaris.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/solaris/vm/thread_solaris.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -29,18 +29,14 @@
#error "This file should only be included from thread.inline.hpp"
#endif
-#include "runtime/atomic.hpp"
+#include "runtime/atomic.inline.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadLocalStorage.hpp"
#ifdef TARGET_OS_ARCH_solaris_x86
-# include "atomic_solaris_x86.inline.hpp"
-# include "orderAccess_solaris_x86.inline.hpp"
# include "prefetch_solaris_x86.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_solaris_sparc
-# include "atomic_solaris_sparc.inline.hpp"
-# include "orderAccess_solaris_sparc.inline.hpp"
# include "prefetch_solaris_sparc.inline.hpp"
#endif
--- a/hotspot/src/os/windows/vm/os_windows.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/windows/vm/os_windows.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -51,6 +51,7 @@
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/perfMemory.hpp"
#include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/os/windows/vm/os_windows.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/windows/vm/os_windows.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,12 +26,9 @@
#define OS_WINDOWS_VM_OS_WINDOWS_INLINE_HPP
#include "runtime/atomic.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "orderAccess_windows_x86.inline.hpp"
-#endif
-
inline const char* os::file_separator() { return "\\"; }
inline const char* os::line_separator() { return "\r\n"; }
inline const char* os::path_separator() { return ";"; }
--- a/hotspot/src/os/windows/vm/thread_windows.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os/windows/vm/thread_windows.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -29,13 +29,10 @@
#error "This file should only be included from thread.inline.hpp"
#endif
-#include "runtime/atomic.hpp"
#include "runtime/prefetch.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadLocalStorage.hpp"
#ifdef TARGET_OS_ARCH_windows_x86
-# include "atomic_windows_x86.inline.hpp"
-# include "orderAccess_windows_x86.inline.hpp"
# include "prefetch_windows_x86.inline.hpp"
#endif
--- a/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,7 +26,6 @@
#ifndef OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
#define OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
-#include "orderAccess_aix_ppc.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
#include "vm_version_ppc.hpp"
--- a/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,7 +26,6 @@
#ifndef OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
#define OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
-#include "orderAccess_linux_ppc.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
#include "vm_version_ppc.hpp"
--- a/hotspot/src/share/vm/ci/ciEnv.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -51,6 +51,7 @@
#include "runtime/init.hpp"
#include "runtime/reflection.hpp"
#include "runtime/sharedRuntime.hpp"
+#include "runtime/thread.inline.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/macros.hpp"
#ifdef COMPILER1
--- a/hotspot/src/share/vm/classfile/dictionary.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/classfile/dictionary.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -28,6 +28,7 @@
#include "memory/iterator.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiRedefineClassesTrace.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "utilities/hashtable.inline.hpp"
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -52,6 +52,7 @@
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/signature.hpp"
#include "services/classLoadingService.hpp"
#include "services/threadService.hpp"
--- a/hotspot/src/share/vm/classfile/verifier.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -43,7 +43,7 @@
#include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/javaCalls.hpp"
-#include "runtime/orderAccess.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
#ifdef TARGET_ARCH_x86
# include "bytes_x86.hpp"
--- a/hotspot/src/share/vm/code/dependencies.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/code/dependencies.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -32,6 +32,7 @@
#include "oops/oop.inline.hpp"
#include "runtime/handles.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/thread.inline.hpp"
#include "utilities/copy.hpp"
--- a/hotspot/src/share/vm/code/nmethod.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/code/nmethod.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -37,6 +37,7 @@
#include "oops/methodData.hpp"
#include "prims/jvmtiRedefineClassesTrace.hpp"
#include "prims/jvmtiImpl.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/sweeper.hpp"
#include "utilities/resourceHash.hpp"
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -39,6 +39,7 @@
#include "runtime/handles.inline.hpp"
#include "runtime/init.hpp"
#include "runtime/java.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/vmThread.hpp"
#include "utilities/copy.hpp"
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -59,6 +59,7 @@
#include "runtime/globals_extension.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/vmThread.hpp"
#include "services/memoryService.hpp"
#include "services/runtimeService.hpp"
--- a/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "gc_implementation/g1/g1AllocRegion.inline.hpp"
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
G1CollectedHeap* G1AllocRegion::_g1h = NULL;
HeapRegion* G1AllocRegion::_dummy_region = NULL;
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -56,6 +56,7 @@
#include "memory/referenceProcessor.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oop.pcgc.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/vmThread.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/ticks.hpp"
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -1107,20 +1107,11 @@
return _gc_time_stamp;
}
- void reset_gc_time_stamp() {
- _gc_time_stamp = 0;
- OrderAccess::fence();
- // Clear the cached CSet starting regions and time stamps.
- // Their validity is dependent on the GC timestamp.
- clear_cset_start_regions();
- }
+ inline void reset_gc_time_stamp();
void check_gc_time_stamps() PRODUCT_RETURN;
- void increment_gc_time_stamp() {
- ++_gc_time_stamp;
- OrderAccess::fence();
- }
+ inline void increment_gc_time_stamp();
// Reset the given region's GC timestamp. If it's starts humongous,
// also reset the GC timestamp of its corresponding
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -33,6 +33,7 @@
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#include "gc_implementation/g1/heapRegionSet.inline.hpp"
#include "gc_implementation/g1/heapRegionSeq.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "utilities/taskqueue.hpp"
// Inline functions for G1CollectedHeap
@@ -60,6 +61,19 @@
return hr;
}
+inline void G1CollectedHeap::reset_gc_time_stamp() {
+ _gc_time_stamp = 0;
+ OrderAccess::fence();
+ // Clear the cached CSet starting regions and time stamps.
+ // Their validity is dependent on the GC timestamp.
+ clear_cset_start_regions();
+}
+
+inline void G1CollectedHeap::increment_gc_time_stamp() {
+ ++_gc_time_stamp;
+ OrderAccess::fence();
+}
+
inline void G1CollectedHeap::old_set_remove(HeapRegion* hr) {
_old_set.remove(hr);
}
--- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -27,6 +27,7 @@
#include "gc_implementation/g1/heapRegion.hpp"
#include "gc_implementation/g1/satbQueue.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/thread.inline.hpp"
G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap,
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -33,6 +33,7 @@
#include "memory/genOopClosures.inline.hpp"
#include "memory/iterator.hpp"
#include "oops/oop.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
int HeapRegion::LogOfHRGrainBytes = 0;
int HeapRegion::LogOfHRGrainWords = 0;
--- a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -32,6 +32,7 @@
#include "oops/oop.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/virtualspace.hpp"
#include "runtime/vmThread.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -50,7 +50,7 @@
#include "runtime/handles.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
-#include "runtime/thread.hpp"
+#include "runtime/thread.inline.hpp"
#include "utilities/copy.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/workgroup.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -30,6 +30,7 @@
#include "memory/allocation.inline.hpp"
#include "runtime/mutex.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
//
// GCTask
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -41,43 +41,10 @@
#include "runtime/frame.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/threadCritical.hpp"
#include "utilities/exceptions.hpp"
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "orderAccess_linux_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_sparc
-# include "orderAccess_linux_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_zero
-# include "orderAccess_linux_zero.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "orderAccess_solaris_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_sparc
-# include "orderAccess_solaris_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "orderAccess_windows_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_arm
-# include "orderAccess_linux_arm.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_ppc
-# include "orderAccess_linux_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_aix_ppc
-# include "orderAccess_aix_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "orderAccess_bsd_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_zero
-# include "orderAccess_bsd_zero.inline.hpp"
-#endif
-
// no precompiled headers
#ifdef CC_INTERP
--- a/hotspot/src/share/vm/memory/gcLocker.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/memory/gcLocker.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,6 +26,7 @@
#include "memory/gcLocker.inline.hpp"
#include "memory/resourceArea.hpp"
#include "memory/sharedHeap.hpp"
+#include "runtime/thread.inline.hpp"
volatile jint GC_locker::_jni_lock_count = 0;
volatile bool GC_locker::_needs_gc = false;
--- a/hotspot/src/share/vm/memory/metaspace.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/memory/metaspace.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -42,7 +42,7 @@
#include "runtime/init.hpp"
#include "runtime/java.hpp"
#include "runtime/mutex.hpp"
-#include "runtime/orderAccess.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "services/memTracker.hpp"
#include "services/memoryService.hpp"
#include "utilities/copy.hpp"
--- a/hotspot/src/share/vm/memory/space.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/memory/space.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -37,6 +37,7 @@
#include "oops/oop.inline.hpp"
#include "oops/oop.inline2.hpp"
#include "runtime/java.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/safepoint.hpp"
#include "utilities/copy.hpp"
#include "utilities/globalDefinitions.hpp"
--- a/hotspot/src/share/vm/oops/cpCache.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/cpCache.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -33,6 +33,7 @@
#include "prims/jvmtiRedefineClassesTrace.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
# include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
--- a/hotspot/src/share/vm/oops/cpCache.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/cpCache.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -27,6 +27,7 @@
#include "interpreter/bytecodes.hpp"
#include "memory/allocation.hpp"
+#include "runtime/orderAccess.hpp"
#include "utilities/array.hpp"
class PSPromotionManager;
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -55,6 +55,7 @@
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/thread.inline.hpp"
#include "services/classLoadingService.hpp"
#include "services/threadService.hpp"
--- a/hotspot/src/share/vm/oops/klass.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/klass.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -36,7 +36,8 @@
#include "oops/instanceKlass.hpp"
#include "oops/klass.inline.hpp"
#include "oops/oop.inline2.hpp"
-#include "runtime/atomic.hpp"
+#include "runtime/atomic.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "trace/traceMacros.hpp"
#include "utilities/stack.hpp"
#include "utilities/macros.hpp"
--- a/hotspot/src/share/vm/oops/klass.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/klass.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -32,7 +32,6 @@
#include "oops/klassPS.hpp"
#include "oops/metadata.hpp"
#include "oops/oop.hpp"
-#include "runtime/orderAccess.hpp"
#include "trace/traceMacros.hpp"
#include "utilities/accessFlags.hpp"
#include "utilities/macros.hpp"
--- a/hotspot/src/share/vm/oops/method.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/method.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -49,6 +49,7 @@
#include "runtime/compilationPolicy.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/relocator.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/signature.hpp"
--- a/hotspot/src/share/vm/oops/methodData.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/methodData.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -34,6 +34,7 @@
#include "runtime/compilationPolicy.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
// ==================================================================
// DataLayout
--- a/hotspot/src/share/vm/oops/objArrayKlass.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -42,6 +42,7 @@
#include "oops/symbol.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "utilities/copy.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
--- a/hotspot/src/share/vm/oops/oop.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -38,7 +38,8 @@
#include "oops/klass.inline.hpp"
#include "oops/markOop.inline.hpp"
#include "oops/oop.hpp"
-#include "runtime/atomic.hpp"
+#include "runtime/atomic.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
#include "utilities/macros.hpp"
#ifdef TARGET_ARCH_x86
--- a/hotspot/src/share/vm/oops/typeArrayKlass.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -39,6 +39,7 @@
#include "oops/typeArrayKlass.hpp"
#include "oops/typeArrayOop.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "utilities/macros.hpp"
bool TypeArrayKlass::compute_is_subtype_of(Klass* k) {
--- a/hotspot/src/share/vm/oops/typeArrayOop.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/oops/typeArrayOop.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -27,39 +27,7 @@
#include "oops/arrayOop.hpp"
#include "oops/typeArrayKlass.hpp"
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "orderAccess_linux_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_sparc
-# include "orderAccess_linux_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_zero
-# include "orderAccess_linux_zero.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "orderAccess_solaris_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_sparc
-# include "orderAccess_solaris_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "orderAccess_windows_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_arm
-# include "orderAccess_linux_arm.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_ppc
-# include "orderAccess_linux_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_aix_ppc
-# include "orderAccess_aix_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "orderAccess_bsd_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_zero
-# include "orderAccess_bsd_zero.inline.hpp"
-#endif
+#include "runtime/orderAccess.inline.hpp"
// A typeArrayOop is an array containing basic types (non oop elements).
// It is used for arrays of {characters, singles, doubles, bytes, shorts, integers, longs}
--- a/hotspot/src/share/vm/precompiled/precompiled.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/precompiled/precompiled.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -193,6 +193,7 @@
# include "runtime/mutexLocker.hpp"
# include "runtime/objectMonitor.hpp"
# include "runtime/orderAccess.hpp"
+# include "runtime/orderAccess.inline.hpp"
# include "runtime/os.hpp"
# include "runtime/osThread.hpp"
# include "runtime/perfData.hpp"
--- a/hotspot/src/share/vm/prims/forte.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/forte.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -32,7 +32,7 @@
#include "oops/oop.inline2.hpp"
#include "prims/forte.hpp"
#include "runtime/javaCalls.hpp"
-#include "runtime/thread.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vframe.hpp"
#include "runtime/vframeArray.hpp"
--- a/hotspot/src/share/vm/prims/jni.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/jni.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -67,6 +67,7 @@
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/jfieldIDWorkaround.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/reflection.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/signature.hpp"
--- a/hotspot/src/share/vm/prims/jniCheck.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -35,7 +35,7 @@
#include "runtime/handles.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/jfieldIDWorkaround.hpp"
-#include "runtime/thread.hpp"
+#include "runtime/thread.inline.hpp"
#ifdef TARGET_ARCH_x86
# include "jniTypes_x86.hpp"
#endif
--- a/hotspot/src/share/vm/prims/jvm.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/jvm.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -51,6 +51,7 @@
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/jfieldIDWorkaround.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/perfData.hpp"
#include "runtime/reflection.hpp"
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -41,6 +41,7 @@
#include "runtime/objectMonitor.hpp"
#include "runtime/objectMonitor.inline.hpp"
#include "runtime/signature.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vframe.hpp"
#include "runtime/vframe_hp.hpp"
#include "runtime/vmThread.hpp"
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -47,7 +47,7 @@
#include "runtime/interfaceSupport.hpp"
#include "runtime/objectMonitor.hpp"
#include "runtime/objectMonitor.inline.hpp"
-#include "runtime/thread.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vframe.hpp"
#include "services/attachListener.hpp"
#include "services/serviceUtil.hpp"
--- a/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -25,7 +25,8 @@
#include "precompiled.hpp"
#include "prims/jvmtiRawMonitor.hpp"
#include "runtime/interfaceSupport.hpp"
-#include "runtime/thread.hpp"
+#include "runtime/orderAccess.inline.hpp"
+#include "runtime/thread.inline.hpp"
GrowableArray<JvmtiRawMonitor*> *JvmtiPendingMonitors::_monitors = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<JvmtiRawMonitor*>(1,true);
--- a/hotspot/src/share/vm/prims/jvmtiThreadState.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiThreadState.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -27,6 +27,7 @@
#include "prims/jvmtiEnvThreadState.hpp"
#include "prims/jvmtiThreadState.hpp"
+#include "runtime/thread.inline.hpp"
// JvmtiEnvThreadStateIterator implementation
--- a/hotspot/src/share/vm/prims/unsafe.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/prims/unsafe.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -33,6 +33,7 @@
#include "prims/jvm.h"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/reflection.hpp"
#include "runtime/synchronizer.hpp"
#include "services/threadService.hpp"
--- a/hotspot/src/share/vm/runtime/fprofiler.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/fprofiler.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -38,6 +38,7 @@
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/task.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vframe.hpp"
#include "utilities/macros.hpp"
--- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -30,6 +30,7 @@
#include "memory/resourceArea.hpp"
#include "runtime/init.hpp"
#include "runtime/interfaceSupport.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "runtime/vframe.hpp"
#include "utilities/preserveException.hpp"
--- a/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,39 +26,7 @@
#define SHARE_VM_RUNTIME_JAVAFRAMEANCHOR_HPP
#include "utilities/globalDefinitions.hpp"
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "orderAccess_linux_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_sparc
-# include "orderAccess_linux_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_zero
-# include "orderAccess_linux_zero.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "orderAccess_solaris_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_sparc
-# include "orderAccess_solaris_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "orderAccess_windows_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_arm
-# include "orderAccess_linux_arm.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_ppc
-# include "orderAccess_linux_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_aix_ppc
-# include "orderAccess_aix_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "orderAccess_bsd_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_zero
-# include "orderAccess_bsd_zero.inline.hpp"
-#endif
+#include "runtime/orderAccess.inline.hpp"
//
// An object for encapsulating the machine/os dependent part of a JavaThread frame state
--- a/hotspot/src/share/vm/runtime/mutex.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/mutex.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "runtime/mutex.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/events.hpp"
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -32,6 +32,7 @@
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
#include "runtime/objectMonitor.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/runtime/orderAccess.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2014 SAP AG. 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_RUNTIME_ORDERACCESS_INLINE_HPP
+#define SHARE_VM_RUNTIME_ORDERACCESS_INLINE_HPP
+
+#include "runtime/orderAccess.hpp"
+
+// Linux
+#ifdef TARGET_OS_ARCH_linux_x86
+# include "orderAccess_linux_x86.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_linux_sparc
+# include "orderAccess_linux_sparc.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_linux_zero
+# include "orderAccess_linux_zero.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_linux_arm
+# include "orderAccess_linux_arm.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_linux_ppc
+# include "orderAccess_linux_ppc.inline.hpp"
+#endif
+
+// Solaris
+#ifdef TARGET_OS_ARCH_solaris_x86
+# include "orderAccess_solaris_x86.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_solaris_sparc
+# include "orderAccess_solaris_sparc.inline.hpp"
+#endif
+
+// Windows
+#ifdef TARGET_OS_ARCH_windows_x86
+# include "orderAccess_windows_x86.inline.hpp"
+#endif
+
+// AIX
+#ifdef TARGET_OS_ARCH_aix_ppc
+# include "orderAccess_aix_ppc.inline.hpp"
+#endif
+
+// BSD
+#ifdef TARGET_OS_ARCH_bsd_x86
+# include "orderAccess_bsd_x86.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_bsd_zero
+# include "orderAccess_bsd_zero.inline.hpp"
+#endif
+
+#endif // SHARE_VM_RUNTIME_ORDERACCESS_INLINE_HPP
--- a/hotspot/src/share/vm/runtime/perfMemory.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/perfMemory.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -28,6 +28,7 @@
#include "runtime/java.hpp"
#include "runtime/mutex.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/perfData.hpp"
#include "runtime/perfMemory.hpp"
--- a/hotspot/src/share/vm/runtime/safepoint.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -41,6 +41,7 @@
#include "runtime/frame.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/signature.hpp"
--- a/hotspot/src/share/vm/runtime/sweeper.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -33,8 +33,10 @@
#include "runtime/atomic.hpp"
#include "runtime/compilationPolicy.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/sweeper.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vm_operations.hpp"
#include "trace/tracing.hpp"
#include "utilities/events.hpp"
--- a/hotspot/src/share/vm/runtime/thread.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/thread.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -58,6 +58,7 @@
#include "runtime/memprofiler.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/sharedRuntime.hpp"
--- a/hotspot/src/share/vm/runtime/thread.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/thread.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -436,18 +436,7 @@
jlong allocated_bytes() { return _allocated_bytes; }
void set_allocated_bytes(jlong value) { _allocated_bytes = value; }
void incr_allocated_bytes(jlong size) { _allocated_bytes += size; }
- jlong cooked_allocated_bytes() {
- jlong allocated_bytes = OrderAccess::load_acquire(&_allocated_bytes);
- if (UseTLAB) {
- size_t used_bytes = tlab().used_bytes();
- if ((ssize_t)used_bytes > 0) {
- // More-or-less valid tlab. The load_acquire above should ensure
- // that the result of the add is <= the instantaneous value
- return allocated_bytes + used_bytes;
- }
- }
- return allocated_bytes;
- }
+ inline jlong cooked_allocated_bytes();
TRACE_DATA* trace_data() { return &_trace_data; }
@@ -1046,12 +1035,8 @@
#else
// Use membars when accessing volatile _thread_state. See
// Threads::create_vm() for size checks.
- JavaThreadState thread_state() const {
- return (JavaThreadState) OrderAccess::load_acquire((volatile jint*)&_thread_state);
- }
- void set_thread_state(JavaThreadState s) {
- OrderAccess::release_store((volatile jint*)&_thread_state, (jint)s);
- }
+ inline JavaThreadState thread_state() const;
+ inline void set_thread_state(JavaThreadState s);
#endif
ThreadSafepointState *safepoint_state() const { return _safepoint_state; }
void set_safepoint_state(ThreadSafepointState *state) { _safepoint_state = state; }
@@ -1775,7 +1760,7 @@
// clearing/querying jni attach status
bool is_attaching_via_jni() const { return _jni_attach_state == _attaching_via_jni; }
bool has_attached_via_jni() const { return is_attaching_via_jni() || _jni_attach_state == _attached_via_jni; }
- void set_done_attaching_via_jni() { _jni_attach_state = _attached_via_jni; OrderAccess::fence(); }
+ inline void set_done_attaching_via_jni();
private:
// This field is used to determine if a thread has claimed
// a par_id: it is UINT_MAX if the thread has not claimed a par_id;
--- a/hotspot/src/share/vm/runtime/thread.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/runtime/thread.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -46,4 +46,32 @@
#undef SHARE_VM_RUNTIME_THREAD_INLINE_HPP_SCOPE
+inline jlong Thread::cooked_allocated_bytes() {
+ jlong allocated_bytes = OrderAccess::load_acquire(&_allocated_bytes);
+ if (UseTLAB) {
+ size_t used_bytes = tlab().used_bytes();
+ if ((ssize_t)used_bytes > 0) {
+ // More-or-less valid tlab. The load_acquire above should ensure
+ // that the result of the add is <= the instantaneous value.
+ return allocated_bytes + used_bytes;
+ }
+ }
+ return allocated_bytes;
+}
+
+#ifdef PPC64
+inline JavaThreadState JavaThread::thread_state() const {
+ return (JavaThreadState) OrderAccess::load_acquire((volatile jint*)&_thread_state);
+}
+
+inline void JavaThread::set_thread_state(JavaThreadState s) {
+ OrderAccess::release_store((volatile jint*)&_thread_state, (jint)s);
+}
+#endif
+
+inline void JavaThread::set_done_attaching_via_jni() {
+ _jni_attach_state = _attached_via_jni;
+ OrderAccess::fence();
+}
+
#endif // SHARE_VM_RUNTIME_THREAD_INLINE_HPP
--- a/hotspot/src/share/vm/services/management.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/services/management.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -39,6 +39,7 @@
#include "runtime/jniHandles.hpp"
#include "runtime/os.hpp"
#include "runtime/serviceThread.hpp"
+#include "runtime/thread.inline.hpp"
#include "services/classLoadingService.hpp"
#include "services/diagnosticCommand.hpp"
#include "services/diagnosticFramework.hpp"
--- a/hotspot/src/share/vm/services/memTracker.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/services/memTracker.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -29,6 +29,7 @@
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/threadCritical.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vm_operations.hpp"
#include "services/memPtr.hpp"
#include "services/memReporter.hpp"
--- a/hotspot/src/share/vm/services/memoryManager.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/services/memoryManager.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -28,6 +28,7 @@
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "services/lowMemoryDetector.hpp"
#include "services/management.hpp"
#include "services/memoryManager.hpp"
--- a/hotspot/src/share/vm/services/memoryPool.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/services/memoryPool.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -29,6 +29,7 @@
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "services/lowMemoryDetector.hpp"
#include "services/management.hpp"
#include "services/memoryManager.hpp"
--- a/hotspot/src/share/vm/services/threadService.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/services/threadService.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -33,6 +33,7 @@
#include "runtime/init.hpp"
#include "runtime/thread.hpp"
#include "runtime/vframe.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
#include "services/threadService.hpp"
--- a/hotspot/src/share/vm/utilities/array.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/utilities/array.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -28,6 +28,7 @@
#include "memory/allocation.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/metaspace.hpp"
+#include "runtime/orderAccess.hpp"
// correct linkage required to compile w/o warnings
// (must be on file level - cannot be local)
--- a/hotspot/src/share/vm/utilities/hashtable.inline.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/utilities/hashtable.inline.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -26,6 +26,7 @@
#define SHARE_VM_UTILITIES_HASHTABLE_INLINE_HPP
#include "memory/allocation.inline.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "utilities/hashtable.hpp"
#include "utilities/dtrace.hpp"
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp Tue Apr 29 15:17:27 2014 +0200
@@ -28,40 +28,8 @@
#include "memory/allocation.hpp"
#include "memory/allocation.inline.hpp"
#include "runtime/mutex.hpp"
+#include "runtime/orderAccess.inline.hpp"
#include "utilities/stack.hpp"
-#ifdef TARGET_OS_ARCH_linux_x86
-# include "orderAccess_linux_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_sparc
-# include "orderAccess_linux_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_zero
-# include "orderAccess_linux_zero.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_x86
-# include "orderAccess_solaris_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_solaris_sparc
-# include "orderAccess_solaris_sparc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_windows_x86
-# include "orderAccess_windows_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_arm
-# include "orderAccess_linux_arm.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_linux_ppc
-# include "orderAccess_linux_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_aix_ppc
-# include "orderAccess_aix_ppc.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_x86
-# include "orderAccess_bsd_x86.inline.hpp"
-#endif
-#ifdef TARGET_OS_ARCH_bsd_zero
-# include "orderAccess_bsd_zero.inline.hpp"
-#endif
// Simple TaskQueue stats that are collected by default in debug builds.
--- a/hotspot/src/share/vm/utilities/vmError.cpp Wed May 07 22:06:42 2014 +0200
+++ b/hotspot/src/share/vm/utilities/vmError.cpp Tue Apr 29 15:17:27 2014 +0200
@@ -30,7 +30,7 @@
#include "runtime/frame.inline.hpp"
#include "runtime/init.hpp"
#include "runtime/os.hpp"
-#include "runtime/thread.hpp"
+#include "runtime/thread.inline.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
#include "services/memTracker.hpp"