src/hotspot/share/code/relocInfo_ext.cpp
changeset 49164 7e958a8ebcd3
parent 47216 71c04702a3d5
child 49455 848864ed9b17
--- a/src/hotspot/share/code/relocInfo_ext.cpp	Mon Feb 26 09:34:20 2018 +0100
+++ b/src/hotspot/share/code/relocInfo_ext.cpp	Mon Feb 26 09:34:12 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. 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
@@ -26,6 +26,7 @@
 #include "code/codeCache.hpp"
 #include "code/relocInfo.hpp"
 #include "code/relocInfo_ext.hpp"
+#include "gc/shared/cardTable.hpp"
 #include "gc/shared/cardTableModRefBS.hpp"
 #include "gc/shared/collectedHeap.hpp"
 #include "memory/universe.hpp"
@@ -59,8 +60,9 @@
   }
   case symbolic_Relocation::card_table_reference: {
     BarrierSet* bs = Universe::heap()->barrier_set();
-    CardTableModRefBS* ct = (CardTableModRefBS*)bs;
-    return (address)ct->byte_map_base;
+    CardTableModRefBS* ctbs = barrier_set_cast<CardTableModRefBS>(bs);
+    CardTable* ct = ctbs->card_table();
+    return (address)ct->byte_map_base();
   }
   case symbolic_Relocation::mark_bits_reference: {
     return (address)Universe::verify_mark_bits();