diff src/share/vm/gc_implementation/g1/heapRegion.hpp @ 2134:b158bed62ef5

6994297: G1: do first-level slow-path allocations with a CAS Summary: First attempt to allocate out the current alloc region using a CAS instead of taking the Heap_lock (first level of G1's slow allocation path). Only if that fails and it's necessary to replace the current alloc region take the Heap_lock (that's the second level of G1's slow allocation path). Reviewed-by: johnc, brutisso, ysr
author tonyp
date Wed, 12 Jan 2011 16:34:25 -0500
parents 2250ee17e258
children 0fa27f37d4d4
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.hpp	Wed Jan 12 13:06:00 2011 -0500
+++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp	Wed Jan 12 16:34:25 2011 -0500
@@ -372,6 +372,15 @@
     Allocated
   };
 
+  inline HeapWord* par_allocate_no_bot_updates(size_t word_size) {
+    assert(is_young(), "we can only skip BOT updates on young regions");
+    return ContiguousSpace::par_allocate(word_size);
+  }
+  inline HeapWord* allocate_no_bot_updates(size_t word_size) {
+    assert(is_young(), "we can only skip BOT updates on young regions");
+    return ContiguousSpace::allocate(word_size);
+  }
+
   // If this region is a member of a HeapRegionSeq, the index in that
   // sequence, otherwise -1.
   int hrs_index() const { return _hrs_index; }