< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp

Print this page
rev 56375 : 8231447: Shenandoah: Compilation-time regression after JDK-8231086


   7  *
   8  * This code is distributed in the hope that it will be useful, but WITHOUT
   9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11  * version 2 for more details (a copy is included in the LICENSE file that
  12  * accompanied this code).
  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 2 along with this work; if not, write to the Free Software Foundation,
  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "gc/shenandoah/shenandoahAsserts.hpp"
  26 #include "gc/shenandoah/shenandoahBarrierSet.hpp"

  27 #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
  28 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  29 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  30 #include "gc/shenandoah/shenandoahHeuristics.hpp"
  31 #include "gc/shenandoah/shenandoahTraversalGC.hpp"
  32 #include "memory/iterator.inline.hpp"
  33 #include "runtime/interfaceSupport.inline.hpp"
  34 #ifdef COMPILER1
  35 #include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
  36 #endif
  37 #ifdef COMPILER2
  38 #include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp"
  39 #endif
  40 
  41 class ShenandoahBarrierSetC1;
  42 class ShenandoahBarrierSetC2;
  43 
  44 ShenandoahBarrierSet::ShenandoahBarrierSet(ShenandoahHeap* heap) :
  45   BarrierSet(make_barrier_set_assembler<ShenandoahBarrierSetAssembler>(),
  46              make_barrier_set_c1<ShenandoahBarrierSetC1>(),


 266     return NULL;
 267   }
 268 
 269   ShenandoahMarkingContext* const marking_context = _heap->marking_context();
 270 
 271   if (_heap->is_evacuation_in_progress()) {
 272     // Normal GC
 273     if (!marking_context->is_marked(obj)) {
 274       return NULL;
 275     }
 276   } else if (_heap->is_concurrent_traversal_in_progress()) {
 277     // Traversal GC
 278     if (marking_context->is_complete() &&
 279         !marking_context->is_marked(resolve_forwarded_not_null(obj))) {
 280       return NULL;
 281     }
 282   }
 283 
 284   return load_reference_barrier_not_null(obj);
 285 }







   7  *
   8  * This code is distributed in the hope that it will be useful, but WITHOUT
   9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11  * version 2 for more details (a copy is included in the LICENSE file that
  12  * accompanied this code).
  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 2 along with this work; if not, write to the Free Software Foundation,
  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "gc/shenandoah/shenandoahAsserts.hpp"
  26 #include "gc/shenandoah/shenandoahBarrierSet.hpp"
  27 #include "gc/shenandoah/shenandoahBarrierSetClone.inline.hpp"
  28 #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
  29 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
  30 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
  31 #include "gc/shenandoah/shenandoahHeuristics.hpp"
  32 #include "gc/shenandoah/shenandoahTraversalGC.hpp"
  33 #include "memory/iterator.inline.hpp"
  34 #include "runtime/interfaceSupport.inline.hpp"
  35 #ifdef COMPILER1
  36 #include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
  37 #endif
  38 #ifdef COMPILER2
  39 #include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp"
  40 #endif
  41 
  42 class ShenandoahBarrierSetC1;
  43 class ShenandoahBarrierSetC2;
  44 
  45 ShenandoahBarrierSet::ShenandoahBarrierSet(ShenandoahHeap* heap) :
  46   BarrierSet(make_barrier_set_assembler<ShenandoahBarrierSetAssembler>(),
  47              make_barrier_set_c1<ShenandoahBarrierSetC1>(),


 267     return NULL;
 268   }
 269 
 270   ShenandoahMarkingContext* const marking_context = _heap->marking_context();
 271 
 272   if (_heap->is_evacuation_in_progress()) {
 273     // Normal GC
 274     if (!marking_context->is_marked(obj)) {
 275       return NULL;
 276     }
 277   } else if (_heap->is_concurrent_traversal_in_progress()) {
 278     // Traversal GC
 279     if (marking_context->is_complete() &&
 280         !marking_context->is_marked(resolve_forwarded_not_null(obj))) {
 281       return NULL;
 282     }
 283   }
 284 
 285   return load_reference_barrier_not_null(obj);
 286 }
 287 
 288 void ShenandoahBarrierSet::clone_barrier_runtime(oop src) {
 289   clone_barrier(src);
 290 }
 291 
< prev index next >