changeset 46664:a1191772ea9d

8184269: JVMCI CompilerToVM::Data::initialize() should use BarrierSet fake RTTI to identify card table barrier sets Reviewed-by: kvn, dnsimon
author eosterlund
date Thu, 13 Jul 2017 12:39:46 +0200
parents 396785d39b69
children 04dbca0ffb10
files hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
diffstat 1 files changed, 3 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Thu Jul 13 15:11:53 2017 +0000
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Thu Jul 13 12:39:46 2017 +0200
@@ -203,26 +203,15 @@
   symbol_clinit = (address) vmSymbols::class_initializer_name();
 
   BarrierSet* bs = Universe::heap()->barrier_set();
-  switch (bs->kind()) {
-  case BarrierSet::CardTableModRef:
-  case BarrierSet::CardTableForRS:
-  case BarrierSet::CardTableExtension:
-  case BarrierSet::G1SATBCT:
-  case BarrierSet::G1SATBCTLogging: {
+  if (bs->is_a(BarrierSet::CardTableModRef)) {
     jbyte* base = barrier_set_cast<CardTableModRefBS>(bs)->byte_map_base;
     assert(base != 0, "unexpected byte_map_base");
     cardtable_start_address = base;
     cardtable_shift = CardTableModRefBS::card_shift;
-    break;
-  }
-  case BarrierSet::ModRef:
+  } else {
+    // No card mark barriers
     cardtable_start_address = 0;
     cardtable_shift = 0;
-    // No post barriers
-    break;
-  default:
-    JVMCI_ERROR("Unsupported BarrierSet kind %d", bs->kind());
-    break;
   }
 
   vm_page_size = os::vm_page_size();