diff -r 580bb0b85f63 -r 7e958a8ebcd3 src/hotspot/share/aot/aotCodeHeap.cpp --- a/src/hotspot/share/aot/aotCodeHeap.cpp Mon Feb 26 09:34:20 2018 +0100 +++ b/src/hotspot/share/aot/aotCodeHeap.cpp Mon Feb 26 09:34:12 2018 +0100 @@ -25,7 +25,10 @@ #include "aot/aotCodeHeap.hpp" #include "aot/aotLoader.hpp" +#include "ci/ciUtilities.hpp" #include "classfile/javaAssertions.hpp" +#include "gc/shared/cardTable.hpp" +#include "gc/shared/cardTableModRefBS.hpp" #include "gc/g1/heapRegion.hpp" #include "gc/shared/gcLocker.hpp" #include "interpreter/abstractInterpreter.hpp" @@ -539,8 +542,7 @@ _lib_symbols_initialized = true; CollectedHeap* heap = Universe::heap(); - CardTableModRefBS* ct = (CardTableModRefBS*)(heap->barrier_set()); - SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_card_table_address", address, ct->byte_map_base); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_card_table_address", address, ci_card_table_address()); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_heap_top_address", address, (heap->supports_inline_contig_alloc() ? heap->top_addr() : NULL)); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_heap_end_address", address, (heap->supports_inline_contig_alloc() ? heap->end_addr() : NULL)); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_polling_page", address, os::get_polling_page());