changeset 30180:8da3724f19a6

Merge
author iignatyev
date Wed, 15 Apr 2015 09:49:50 +0000
parents 9901fb13c60e 925cd0b4f0e7
children c1be7675a9a8
files
diffstat 27 files changed, 44 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -28,7 +28,7 @@
 #include "gc_implementation/concurrentMarkSweep/adaptiveFreeList.hpp"
 #include "gc_implementation/concurrentMarkSweep/promotionInfo.hpp"
 #include "memory/binaryTreeDictionary.hpp"
-#include "memory/blockOffsetTable.inline.hpp"
+#include "memory/blockOffsetTable.hpp"
 #include "memory/freeList.hpp"
 #include "memory/space.hpp"
 
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -65,6 +65,7 @@
 #include "runtime/vmThread.hpp"
 #include "services/memoryService.hpp"
 #include "services/runtimeService.hpp"
+#include "utilities/stack.inline.hpp"
 
 // statics
 CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL;
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -38,8 +38,8 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/virtualspace.hpp"
 #include "services/memoryService.hpp"
-#include "utilities/bitMap.inline.hpp"
-#include "utilities/stack.inline.hpp"
+#include "utilities/bitMap.hpp"
+#include "utilities/stack.hpp"
 #include "utilities/taskqueue.hpp"
 #include "utilities/yieldingWorkgroup.hpp"
 
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -27,7 +27,7 @@
 
 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
 #include "gc_implementation/shared/concurrentGCThread.hpp"
-#include "runtime/thread.inline.hpp"
+#include "runtime/thread.hpp"
 
 class ConcurrentMarkSweepGeneration;
 class CMSCollector;
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -34,6 +34,7 @@
 #include "gc_implementation/g1/g1Log.hpp"
 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
 #include "gc_implementation/g1/g1RemSet.hpp"
+#include "gc_implementation/g1/g1StringDedup.hpp"
 #include "gc_implementation/g1/heapRegion.inline.hpp"
 #include "gc_implementation/g1/heapRegionManager.inline.hpp"
 #include "gc_implementation/g1/heapRegionRemSet.hpp"
--- a/hotspot/src/share/vm/gc_implementation/g1/g1Allocator.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1Allocator.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -29,6 +29,9 @@
 #include "gc_implementation/g1/g1AllocRegion.hpp"
 #include "gc_implementation/g1/g1InCSetState.hpp"
 #include "gc_implementation/shared/parGCAllocBuffer.hpp"
+#include "gc_interface/collectedHeap.hpp"
+
+class EvacuationInfo;
 
 // Base class for G1 allocators.
 class G1Allocator : public CHeapObj<mtGC> {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -70,6 +70,7 @@
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/vmThread.hpp"
 #include "utilities/globalDefinitions.hpp"
+#include "utilities/stack.inline.hpp"
 
 size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1HotCardCache.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1HotCardCache.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -29,7 +29,7 @@
 #include "gc_implementation/g1/g1CardCounts.hpp"
 #include "memory/allocation.hpp"
 #include "runtime/safepoint.hpp"
-#include "runtime/thread.inline.hpp"
+#include "runtime/thread.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 class DirtyCardQueue;
@@ -123,7 +123,7 @@
   // Resets the hot card cache and discards the entries.
   void reset_hot_cache() {
     assert(SafepointSynchronize::is_at_safepoint(), "Should be at a safepoint");
-    assert(Thread::current()->is_VM_thread(), "Current thread should be the VMthread");
+    assert(Thread::current_noinline()->is_VM_thread(), "Current thread should be the VMthread");
     if (default_use_cache()) {
         reset_hot_cache_internal();
     }
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -25,7 +25,7 @@
 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1MARKSWEEP_HPP
 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1MARKSWEEP_HPP
 
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
+#include "gc_implementation/g1/g1CollectedHeap.hpp"
 #include "gc_implementation/g1/heapRegion.hpp"
 #include "memory/genMarkSweep.hpp"
 #include "memory/generation.hpp"
--- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -28,6 +28,7 @@
 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
 #include "gc_implementation/g1/g1ParScanThreadState.hpp"
 #include "memory/iterator.inline.hpp"
+#include "utilities/stack.inline.hpp"
 
 G1ParCopyHelper::G1ParCopyHelper(G1CollectedHeap* g1,  G1ParScanThreadState* par_scan_state) :
   G1ParClosureSuper(g1, par_scan_state), _scanned_klass(NULL),
--- a/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -26,8 +26,10 @@
 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
 #include "gc_implementation/g1/g1ParScanThreadState.inline.hpp"
+#include "gc_implementation/g1/g1StringDedup.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/prefetch.inline.hpp"
+#include "utilities/stack.inline.hpp"
 
 G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
   : _g1h(g1h),
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -38,6 +38,7 @@
 #include "oops/oop.inline.hpp"
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/intHisto.hpp"
+#include "utilities/stack.inline.hpp"
 
 #define CARD_REPEAT_HISTO 0
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -27,6 +27,7 @@
 #include "classfile/javaClasses.inline.hpp"
 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+#include "gc_implementation/g1/g1StringDedup.hpp"
 #include "gc_implementation/g1/g1StringDedupTable.hpp"
 #include "memory/gcLocker.hpp"
 #include "memory/padded.inline.hpp"
--- a/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -29,6 +29,7 @@
 #include "runtime/mutexLocker.hpp"
 
 class G1StringDedupEntryCache;
+class G1StringDedupUnlinkOrOopsDoClosure;
 
 //
 // Table entry in the deduplication hashtable. Points weakly to the
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -31,7 +31,6 @@
 #include "gc_implementation/g1/survRateGroup.hpp"
 #include "gc_implementation/shared/ageTable.hpp"
 #include "gc_implementation/shared/spaceDecorator.hpp"
-#include "memory/space.inline.hpp"
 #include "memory/watermark.hpp"
 #include "utilities/macros.hpp"
 
--- a/hotspot/src/share/vm/gc_implementation/g1/vmStructs_g1.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/g1/vmStructs_g1.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -26,8 +26,8 @@
 #define SHARE_VM_GC_IMPLEMENTATION_G1_VMSTRUCTS_G1_HPP
 
 #include "gc_implementation/g1/heapRegion.hpp"
-#include "gc_implementation/g1/heapRegionManager.inline.hpp"
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
+#include "gc_implementation/g1/heapRegionManager.hpp"
+#include "gc_implementation/g1/g1CollectedHeap.hpp"
 
 #define VM_STRUCTS_G1(nonstatic_field, static_field)                          \
                                                                               \
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -53,6 +53,7 @@
 #include "runtime/thread.inline.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/globalDefinitions.hpp"
+#include "utilities/stack.inline.hpp"
 #include "utilities/workgroup.hpp"
 
 #ifdef _MSC_VER
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -170,27 +170,11 @@
 }
 
 bool ParallelScavengeHeap::is_in(const void* p) const {
-  if (young_gen()->is_in(p)) {
-    return true;
-  }
-
-  if (old_gen()->is_in(p)) {
-    return true;
-  }
-
-  return false;
+  return young_gen()->is_in(p) || old_gen()->is_in(p);
 }
 
 bool ParallelScavengeHeap::is_in_reserved(const void* p) const {
-  if (young_gen()->is_in_reserved(p)) {
-    return true;
-  }
-
-  if (old_gen()->is_in_reserved(p)) {
-    return true;
-  }
-
-  return false;
+  return young_gen()->is_in_reserved(p) || old_gen()->is_in_reserved(p);
 }
 
 bool ParallelScavengeHeap::is_scavengable(const void* addr) {
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -32,7 +32,7 @@
 #include "gc_implementation/parallelScavenge/psYoungGen.hpp"
 #include "gc_implementation/shared/gcPolicyCounters.hpp"
 #include "gc_implementation/shared/gcWhen.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc_interface/collectedHeap.hpp"
 #include "memory/collectorPolicy.hpp"
 #include "memory/strongRootsScope.hpp"
 #include "utilities/ostream.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -26,7 +26,7 @@
 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONLAB_HPP
 
 #include "gc_implementation/parallelScavenge/objectStartArray.hpp"
-#include "gc_interface/collectedHeap.inline.hpp"
+#include "gc_interface/collectedHeap.hpp"
 #include "memory/allocation.hpp"
 
 //
--- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -239,22 +239,11 @@
   }
 
   // Returns "TRUE" iff "p" points into the committed areas of the heap.
-  // Since this method can be expensive in general, we restrict its
-  // use to assertion checking only.
+  // This method can be expensive so avoid using it in performance critical
+  // code.
   virtual bool is_in(const void* p) const = 0;
 
-  bool is_in_or_null(const void* p) const {
-    return p == NULL || is_in(p);
-  }
-
-  bool is_in_place(Metadata** p) {
-    return !Universe::heap()->is_in(p);
-  }
-  bool is_in_place(oop* p) { return Universe::heap()->is_in(p); }
-  bool is_in_place(narrowOop* p) {
-    oop o = oopDesc::load_decode_heap_oop_not_null(p);
-    return Universe::heap()->is_in((const void*)o);
-  }
+  DEBUG_ONLY(bool is_in_or_null(const void* p) const { return p == NULL || is_in(p); })
 
   // Let's define some terms: a "closed" subset of a heap is one that
   //
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -50,9 +50,10 @@
 #include "runtime/vmThread.hpp"
 #include "services/management.hpp"
 #include "services/memoryService.hpp"
+#include "utilities/macros.hpp"
+#include "utilities/stack.inline.hpp"
 #include "utilities/vmError.hpp"
 #include "utilities/workgroup.hpp"
-#include "utilities/macros.hpp"
 #if INCLUDE_ALL_GCS
 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
 #include "gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp"
@@ -905,17 +906,6 @@
 
 // Returns "TRUE" iff "p" points into the committed areas of the heap.
 bool GenCollectedHeap::is_in(const void* p) const {
-  #ifndef ASSERT
-  guarantee(VerifyBeforeGC      ||
-            VerifyDuringGC      ||
-            VerifyBeforeExit    ||
-            VerifyDuringStartup ||
-            PrintAssembly       ||
-            tty->count() != 0   ||   // already printing
-            VerifyAfterGC       ||
-    VMError::fatal_error_in_progress(), "too expensive");
-
-  #endif
   return _young_gen->is_in(p) || _old_gen->is_in(p);
 }
 
--- a/hotspot/src/share/vm/precompiled/precompiled.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/precompiled/precompiled.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -94,7 +94,6 @@
 # include "gc_implementation/shared/spaceCounters.hpp"
 # include "gc_implementation/shared/spaceDecorator.hpp"
 # include "gc_interface/collectedHeap.hpp"
-# include "gc_interface/collectedHeap.inline.hpp"
 # include "gc_interface/gcCause.hpp"
 # include "interpreter/abstractInterpreter.hpp"
 # include "interpreter/bytecode.hpp"
@@ -114,9 +113,7 @@
 # include "memory/allocation.hpp"
 # include "memory/allocation.inline.hpp"
 # include "memory/barrierSet.hpp"
-# include "memory/barrierSet.inline.hpp"
 # include "memory/blockOffsetTable.hpp"
-# include "memory/blockOffsetTable.inline.hpp"
 # include "memory/cardTableModRefBS.hpp"
 # include "memory/collectorPolicy.hpp"
 # include "memory/defNewGeneration.hpp"
@@ -134,7 +131,6 @@
 # include "memory/resourceArea.hpp"
 # include "memory/space.hpp"
 # include "memory/threadLocalAllocBuffer.hpp"
-# include "memory/threadLocalAllocBuffer.inline.hpp"
 # include "memory/universe.hpp"
 # include "memory/universe.inline.hpp"
 # include "memory/watermark.hpp"
@@ -302,7 +298,6 @@
 # include "gc_implementation/concurrentMarkSweep/promotionInfo.hpp"
 # include "gc_implementation/g1/dirtyCardQueue.hpp"
 # include "gc_implementation/g1/g1BlockOffsetTable.hpp"
-# include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp"
 # include "gc_implementation/g1/g1OopClosures.hpp"
 # include "gc_implementation/g1/g1_globals.hpp"
 # include "gc_implementation/g1/ptrQueue.hpp"
--- a/hotspot/src/share/vm/runtime/thread.cpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Wed Apr 15 09:49:50 2015 +0000
@@ -272,6 +272,11 @@
 #endif // ASSERT
 }
 
+// Non-inlined version to be used where thread.inline.hpp shouldn't be included.
+Thread* Thread::current_noinline() {
+  return Thread::current();
+}
+
 void Thread::initialize_thread_local_storage() {
   // Note: Make sure this method only calls
   // non-blocking operations. Otherwise, it might not work
--- a/hotspot/src/share/vm/runtime/thread.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -324,6 +324,8 @@
 
   // Returns the current thread
   static inline Thread* current();
+  // ... without having to include thread.inline.hpp.
+  static Thread* current_noinline();
 
   // Common thread operations
   static void set_priority(Thread* thread, ThreadPriority priority);
--- a/hotspot/src/share/vm/utilities/stack.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/utilities/stack.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -96,11 +96,16 @@
 public:
   friend class StackIterator<E, F>;
 
+  // Number of elements that fit in 4K bytes minus the size of two pointers
+  // (link field and malloc header).
+  static const size_t _default_segment_size =  (4096 - 2 * sizeof(E*)) / sizeof(E);
+  static size_t default_segment_size() { return _default_segment_size; }
+
   // segment_size:    number of items per segment
   // max_cache_size:  maxmium number of *segments* to cache
   // max_size:        maximum number of items allowed, rounded to a multiple of
   //                  the segment size (0 == unlimited)
-  inline Stack(size_t segment_size = default_segment_size(),
+  inline Stack(size_t segment_size = _default_segment_size,
                size_t max_cache_size = 4, size_t max_size = 0);
   inline ~Stack() { clear(true); }
 
@@ -122,8 +127,6 @@
   // clear_cache is true, also release any cached segments.
   void clear(bool clear_cache = false);
 
-  static inline size_t default_segment_size();
-
 protected:
   // Each segment includes space for _seg_size elements followed by a link
   // (pointer) to the previous segment; the space is allocated as a single block
--- a/hotspot/src/share/vm/utilities/stack.inline.hpp	Thu Apr 09 14:16:04 2015 +0300
+++ b/hotspot/src/share/vm/utilities/stack.inline.hpp	Wed Apr 15 09:49:50 2015 +0000
@@ -86,14 +86,6 @@
 }
 
 template <class E, MEMFLAGS F>
-size_t Stack<E, F>::default_segment_size()
-{
-  // Number of elements that fit in 4K bytes minus the size of two pointers
-  // (link field and malloc header).
-  return (4096 - 2 * sizeof(E*)) / sizeof(E);
-}
-
-template <class E, MEMFLAGS F>
 size_t Stack<E, F>::adjust_segment_size(size_t seg_size)
 {
   const size_t elem_sz = sizeof(E);